Skip to content

[PM-32685] Send cherry-pick slack message to QA#7151

Merged
mpbw2 merged 1 commit into
mainfrom
PM-32685/cherry-pick-alerts
Jul 9, 2026
Merged

[PM-32685] Send cherry-pick slack message to QA#7151
mpbw2 merged 1 commit into
mainfrom
PM-32685/cherry-pick-alerts

Conversation

@mpbw2

@mpbw2 mpbw2 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-32685

📔 Objective

When changed are cherry-picked to a release/ branch, a :cherry-pick: slack message pinging @group-qa is generated with a link to the commit

@mpbw2 mpbw2 added t:ci Change Type - Updates to automated workflows ai-review Request a Claude code review labels Jul 8, 2026
@mpbw2
mpbw2 requested a review from vvolkgang July 8, 2026 21:09
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed a new CI workflow (.github/workflows/send_slack_notification.yml) that posts a :cherry-pick: Slack notification pinging QA when commits land on a release/ branch. The Azure login, Key Vault secret retrieval, release/**/* branch filter, and pinned Slack action version all match established patterns in the repo's existing workflows (build.yml, test.yml). Commit values are passed through environment variables rather than inline interpolation, avoiding script-injection risk.

The one open thread — workflow_dispatch producing a malformed message because github.event.head_commit is null — has already been raised and acknowledged by the author as temporary testing scaffolding that will be removed. No new findings.

Code Review Details

No new findings. The previously raised workflow_dispatch question is acknowledged as temporary and out of scope.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.49%. Comparing base (329643c) to head (22a4273).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7151   +/-   ##
=======================================
  Coverage   86.49%   86.49%           
=======================================
  Files         908      908           
  Lines       65230    65230           
  Branches     9600     9600           
=======================================
  Hits        56422    56422           
  Misses       5365     5365           
  Partials     3443     3443           
Flag Coverage Δ
app-data 17.31% <ø> (ø)
app-ui-auth-tools 18.63% <ø> (ø)
app-ui-platform 16.58% <ø> (ø)
app-ui-vault 28.14% <ø> (ø)
authenticator 6.15% <ø> (ø)
lib-core-network-bridge 4.05% <ø> (ø)
lib-data-ui 1.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +37 to +51
- name: Build message
id: msg
env:
COMMIT_URL: ${{ github.event.head_commit.url }}
COMMIT_SHA: ${{ github.event.head_commit.id }}
run: |
echo "text=:cherry-pick: <${COMMIT_URL}|${COMMIT_SHA}> into *${GITHUB_REF_NAME}*\ncc <!subteam^S022CDR7W2Z> <@U06538MSPJP>" >> "$GITHUB_OUTPUT"

- name: Send slack notification
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
with:
webhook: ${{ steps.retrieve-slack-secrets.outputs.SLACK-WEBHOOK-TEAM-ENG-MOBILE }}
webhook-type: incoming-webhook
payload: |
text: "${{ steps.msg.outputs.text }}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QUESTION: On workflow_dispatch, github.event.head_commit is null, so this sends a malformed message to QA.

Details

The if condition on line 18 (github.event_name != 'push' || ...) intentionally lets manual dispatch runs through. But on a workflow_dispatch event, github.event.head_commit is null, so COMMIT_URL and COMMIT_SHA resolve to empty strings. The resulting Slack message becomes:

:cherry-pick: <|>  into *<branch>*
cc <!subteam^S022CDR7W2Z> <@U06538MSPJP>

i.e. an empty link <|> and no commit reference, which still pings @group-qa.

Is workflow_dispatch intended only for testing? If so, consider gating the message-build/send behind a push event, or populating the commit fields from github.sha as a fallback so a manual run doesn't ping QA with an empty commit link.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for testing and will be removed later

@mpbw2
mpbw2 marked this pull request as ready for review July 8, 2026 21:17
@mpbw2
mpbw2 requested a review from a team as a code owner July 8, 2026 21:17
@mpbw2
mpbw2 enabled auto-merge July 8, 2026 21:23

@vvolkgang vvolkgang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mpbw2
mpbw2 added this pull request to the merge queue Jul 9, 2026
Merged via the queue into main with commit 05b7e27 Jul 9, 2026
41 of 44 checks passed
@mpbw2
mpbw2 deleted the PM-32685/cherry-pick-alerts branch July 9, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review t:ci Change Type - Updates to automated workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants