Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Notifier] Add Google Chat bridge#36488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
2818f7b tof6be85fComparesrc/Symfony/Component/Notifier/Bridge/GoogleChat/Component/ComponentTrait.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
| if ('googlechat' === $scheme) { | ||
| $space = explode('/', $dsn->getPath())[3]; | ||
| $accessKey = $dsn->getOption('key'); | ||
| $accessToken = $dsn->getOption('token'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You should probably throw an exception of the key and/or token is empty. Or perhaps better, user the username/password like other providers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I like the simplicity of copy-paste the webhook url without too much alteration. Changing the scheme is already a trap I fell into while coding this bridge.
But maybe it's a good thing to move apart from the url provided by Google in order to make clear for developers that they have to parse it in their mind and rewrite it following a custom pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Regarding how other DSN are made, I chose to use a DSN totally different from the webhook url.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
After a review ofexisting DSN, I applied the following format:
googlechat://ACCESS_KEY:ACCESS_TOKEN@default/SPACE?threadKey=THREADWhereTHREAD is optional.
f24c202 to467b481CompareGromNaN commentedJul 31, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This PR was not getting much attention. Since the scope was a little too large, I've removed some non-essential features (card DSL, create transform from webhookUrl) in1b1946c. I hope It can be accepted with this scope. |
fabpot left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM with some minor comments.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Notifier/Bridge/GoogleChat/GoogleChatTransport.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Notifier/Bridge/GoogleChat/GoogleChatTransport.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
GromNaN commentedAug 6, 2020
Thanks for the review. Each comment has been treated. |
fabpot commentedAug 7, 2020
Thank you@GromNaN. |
fabpot commentedAug 10, 2020
@GromNaN Can you submit a PR on symfony/recipes (you can have a look at other notifier bridge recipes to get some inspiration)? |
…transports (GromNaN)This PR was squashed before being merged into the master branch.Discussion----------[Notifier] Add GoogleChat to the list of supported chat transportsDocumentation forsymfony/symfony#36488Commits-------7bfacde [Notifier] Add GoogleChat to the list of supported chat transports
Uh oh!
There was an error while loading.Please reload this page.
Uses the webhook to send messages.
The
threadKeycan be any string, it allows to post all messages to the same thread instead of creating a new thread for each message.Example of notification for exceptions:
