Skip to content

feat!: migrate Google Chat cards to Cards v2 - #97

Merged
ialejandro merged 1 commit into
mainfrom
feat/bitbucket-bot-cards-v2
Oct 17, 2026
Merged

ialejandro merged 1 commit into
mainfrom
feat/bitbucket-bot-cards-v2

Conversation

@ialejandro

Copy link
Copy Markdown
Member

The bot posted the legacy cards payload (keyValue, textButton) to the Google Chat webhook. This sends cardsV2 instead, with decoratedText and buttonList. Content, icons and the Review PR button are the same. cardId is pr-{id}, and the multi-line text in pr:modified now uses <br>.

BREAKING CHANGE: the payload sent to the webhook changes from cards to cardsV2. Anything reading or relaying the old format needs updating. The README has a migration section and a regenerated payload example.

Tests now mock requests.post and check the JSON sent for each event. test_pr_declined was loading the approved sample, and merged had no test; both are fixed. pytest gives 9 passed and pylint app 10.00/10.

STAR and DESCRIPTION are in the official built-in icons table, so they are used as knownIcon. Not tested against a real Chat space (mocks only), so the render is confirmed only after deploy.

🤖 Generated with Claude Code

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>
@ialejandro
ialejandro merged commit 6028fc4 into main Oct 17, 2026
5 checks passed
@ialejandro
ialejandro deleted the feat/bitbucket-bot-cards-v2 branch October 17, 2026 17:53
@ialejandro

Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants