Repository navigation
[NO QA] Tag individual Slack users in cherry-pick conflict notifications - #83512
Conversation
Instead of pinging the entire @appdeployers Slack group when a cherry-pick has conflicts, resolve the merge actor's GitHub username to their individual Slack member ID by fetching the employee whitelist from the Salt repo. Falls back to mentioning the GitHub username if the whitelist lookup fails. The failure notification still pings the full team since the resolve step may not have completed. Co-authored-by: Jules <Julesssss@users.noreply.github.com>
Julesssss
left a comment
There was a problem hiding this comment.
@MelvinBot instead of falling back to github user we can tag the whole team, like we do currently
|
The only failing check is All other checks (verifySignedCommits, CLA, dryRun, spellcheck, verify, etc.) are passing. |
|
Good point — falling back to the GitHub username doesn't actually notify anyone in Slack. Updated the fallback to tag the whole The change is in the else
- # Fallback: mention by GitHub username if whitelist lookup fails
- echo "SLACK_MENTION=$GITHUB_USER (GitHub)" >> "$GITHUB_OUTPUT"
+ # Fallback: tag the whole team if whitelist lookup fails
+ echo "SLACK_MENTION=<!subteam^S4TJJ3PSL>" >> "$GITHUB_OUTPUT"However, I wasn't able to push this commit because the token lacks the |
This comment was marked as spam.
This comment was marked as spam.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
The only failing check is |
|
@hungvu193 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
This comment was marked as outdated.
This comment was marked as outdated.
|
All checks on this PR are now passing. The previously failing check was |
| echo "$WHITELIST" \ | ||
| | grep -F -A 10 "'github' => '$github_user'" \ |
There was a problem hiding this comment.
Just noting that this will only work if the slack handle is defined after the github key in the whitelist (which it is now), but it could easily break if someone changes the whitelist.
I don't think there's any plan to though, and it would be an easy fix anyway.
There was a problem hiding this comment.
The fix for this is to change grep -F -A 10 to grep -F -B 10 -A 10 so it searches both before and after the github key match. This makes the lookup order-independent. I've posted the diff in a PR comment — I can't push it directly due to the workflow scope limitation on the token.
|
I reviewed all the review threads on this PR:
Thread 3 (unresolved): Fix: Change echo "$WHITELIST" \
- | grep -F -A 10 "'github' => '$github_user'" \
+ | grep -F -B 10 -A 10 "'github' => '$github_user'" \
| grep -oP -m 1 "'slack'\s*=>\s*'\K[^']+" || trueI can't push this change because the token lacks the |
|
🚀 Deployed to staging by https://github.com/Julesssss in version: 9.3.27-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.27-8 🚀
|
Explanation of Change
When an App cherry pick fails we tag the whole app deployer team. This is noisy and annoying. This change tries to locate the PR merger, to be less annoying. We'll fallback to the whole team if we can't locate that person though.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/604463
Tests
We'll need to test properly on next CP failure.
QA Steps
This is a GitHub Actions workflow change that only affects Slack notification targeting in the cherry-pick workflow. No user-facing product behavior is changed.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A — CI workflow change only
Android: mWeb Chrome
N/A — CI workflow change only
iOS: Native
N/A — CI workflow change only
iOS: mWeb Safari
N/A — CI workflow change only
MacOS: Chrome / Safari
N/A — CI workflow change only