Repository navigation
feat!: migrate Google Chat cards to Cards v2 - #97
Merged
Merged
Conversation
The bot still sent the legacy cards payload (keyValue, textButton). Send cardsV2 with decoratedText and buttonList instead, with the same content and the same Review PR button. Multi-line text in pr:modified now uses <br>. Tests now mock requests.post and check the JSON sent for every event; test_pr_declined was loading the approved sample, and merged had no test. BREAKING CHANGE: the payload posted to the Google Chat webhook changes from cards to cardsV2. Anything reading or relaying the old format has to be updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Iván Alejandro Marugán <hello@ialejandro.rocks>
Member
Author
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bot posted the legacy
cardspayload (keyValue,textButton) to the Google Chat webhook. This sendscardsV2instead, withdecoratedTextandbuttonList. Content, icons and the Review PR button are the same.cardIdispr-{id}, and the multi-line text inpr:modifiednow uses<br>.BREAKING CHANGE: the payload sent to the webhook changes from
cardstocardsV2. Anything reading or relaying the old format needs updating. The README has a migration section and a regenerated payload example.Tests now mock
requests.postand check the JSON sent for each event.test_pr_declinedwas loading the approved sample, and merged had no test; both are fixed.pytestgives 9 passed andpylint app10.00/10.STARandDESCRIPTIONare in the official built-in icons table, so they are used asknownIcon. Not tested against a real Chat space (mocks only), so the render is confirmed only after deploy.🤖 Generated with Claude Code