Skip to content

chore(repo): react to publish approval instead of a threaded Slack reply - #36528

Open
claude[bot] wants to merge 1 commit into
masterfrom
feat/publish-approval-reaction
Open

chore(repo): react to publish approval instead of a threaded Slack reply#36528
claude[bot] wants to merge 1 commit into
masterfrom
feat/publish-approval-reaction

Conversation

@claude

@claude claude Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Requested by Jason Jean · Slack thread

Current Behavior

Following #36502, publish.yml posts three Slack notifications via slackapi/slack-github-action (chat.postMessage, using SLACK_BOT_TOKEN):

  1. report-pending-publish posts the initial "📦 Publish Pending Review" message and captures its ts.
  2. The publish job (gated on the npm-registry environment) posts a full threaded reply — "✅ Publish Approved" — off that ts.
  3. report-published posts a threaded reply — "🎉 Published Successfully" — off that same ts.

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

  • The "✅ Publish Approved" step no longer posts a threaded reply. Instead it adds a white_check_mark reaction to the original pending-review message, via slackapi/slack-github-action with method: reactions.add and payload {"channel": "C024JCL7TST", "timestamp": "<ts>", "name": "white_check_mark"} (same channel/ts captured from report-pending-publish).
  • The "🎉 Published Successfully" step is untouched — still a full threaded chat.postMessage reply.
  • No other behavior changes: reviewer-mention logic, message formatting for the other two notifications, and the job/environment-gate structure are all unchanged.

Diff is scoped to the two steps inside the publish job that build and send the approval notification (.github/workflows/publish.yml).

Manual follow-up needed (before this works in production)

reactions.add requires the reactions:write OAuth scope on the Slack bot token. The "Nightlies Reporter" Slack app that SLACK_BOT_TOKEN belongs to currently only has chat:write, chat:write.public, and incoming-webhook — it does not have reactions:write.

Before this change will actually work (rather than failing with missing_scope and silently no-op'ing thanks to continue-on-error: true):

  1. A Slack Workspace Owner (Jeff Cross or Victor Savkin — a Workspace/Org Admin is not sufficient) needs to add the reactions:write scope to the "Nightlies Reporter" app and approve reinstalling it into the workspace.
  2. After reinstall, the app's bot token changes — the SLACK_BOT_TOKEN secret in nrwl/nx needs to be refreshed with the new token, or the step will fail with missing_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: true so 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.

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.
@claude
claude Bot requested a review from a team as a code owner July 30, 2026 19:09
@claude
claude Bot requested a review from JamesHenry July 30, 2026 19:09
@netlify

netlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit e0f03a0
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6a6ba16938aab30008ba20d1
😎 Deploy Preview https://deploy-preview-36528--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 30, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit e0f03a0
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6a6ba16977da140008350e91
😎 Deploy Preview https://deploy-preview-36528--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit e0f03a0

Command Status Duration Result
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3s View ↗
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded <1s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 59s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 18s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-30 19:13:49 UTC

@claude claude Bot changed the title ci(repo): react to publish approval instead of a threaded Slack reply chore(repo): react to publish approval instead of a threaded Slack reply Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant