chore(repo): react to publish approval instead of a threaded Slack reply - #36528
Open
claude[bot] wants to merge 1 commit into
Open
chore(repo): react to publish approval instead of a threaded Slack reply#36528claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
Switches the "Publish Approved" notification in publish.yml from a threaded chat.postMessage reply to a white_check_mark reaction on the original pending-review message via reactions.add, so approval is a lightweight signal instead of another message in the thread. The final "Published Successfully" notification is unchanged and stays a threaded reply. Note: this requires the SLACK_BOT_TOKEN secret to carry the reactions:write scope, which the Slack app is not currently granted - see PR description for the manual follow-up needed before this works in production.
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit e0f03a0
☁️ Nx Cloud last updated this comment at |
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.
Requested by Jason Jean · Slack thread
Current Behavior
Following #36502,
publish.ymlposts three Slack notifications viaslackapi/slack-github-action(chat.postMessage, usingSLACK_BOT_TOKEN):report-pending-publishposts the initial "📦 Publish Pending Review" message and captures itsts.publishjob (gated on thenpm-registryenvironment) posts a full threaded reply — "✅ Publish Approved" — off thatts.report-publishedposts a threaded reply — "🎉 Published Successfully" — off that samets.Jason asked that the approval step be less noisy: a whole extra message in the thread just to say "approved" is more visual weight than the moment needs, while the final "it shipped" notification is fine as a full reply.
Expected Behavior
white_check_markreaction to the original pending-review message, viaslackapi/slack-github-actionwithmethod: reactions.addand payload{"channel": "C024JCL7TST", "timestamp": "<ts>", "name": "white_check_mark"}(same channel/ts captured fromreport-pending-publish).chat.postMessagereply.Diff is scoped to the two steps inside the
publishjob that build and send the approval notification (.github/workflows/publish.yml).Manual follow-up needed (before this works in production)
reactions.addrequires thereactions:writeOAuth scope on the Slack bot token. The "Nightlies Reporter" Slack app thatSLACK_BOT_TOKENbelongs to currently only haschat:write,chat:write.public, andincoming-webhook— it does not havereactions:write.Before this change will actually work (rather than failing with
missing_scopeand silently no-op'ing thanks tocontinue-on-error: true):reactions:writescope to the "Nightlies Reporter" app and approve reinstalling it into the workspace.SLACK_BOT_TOKENsecret innrwl/nxneeds to be refreshed with the new token, or the step will fail withmissing_scope.I have not attempted to change the Slack app's scopes or reinstall it myself — that requires workspace-owner action outside of this PR. Until that follow-up happens, this step will fail Slack-side; it's wrapped in
continue-on-error: trueso it won't block the actual publish, but the approval reaction won't show up until the token is refreshed.Related Issue(s)
N/A — follow-up to #36502 based on Slack feedback, not tied to a filed issue.