fix: only notify Slack when a publish was attempted [agent-managed] - #7020
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
🛎️ Concierge
|
|
There was a problem hiding this comment.
Overview
This PR fixes a false-positive Slack notification in the changeset publish workflow. Previously, merging without a changeset (e.g. Renovate config or workflow file changes) would trigger a "Publishing failed" message because the old notify-slack job's condition (hasChangesets == 'false') was true whenever no changesets existed — regardless of whether a publish was actually attempted. The fix splits the single notification job into two: notify-slack-success (fires only when packages are actually published) and notify-slack-failure (fires only when the version job genuinely fails). This is a clean, minimal, and correct fix.
For reviewers
Entry point: Start at .github/workflows/changeset.yaml — the single changed file splits one conditional job into two independent jobs.
Key questions:
- Is the
always()guard onnotify-slack-failurecorrect? It ensures the job runs even whenversionfails (GitHub Actions default skips dependents), whileresult == 'failure'excludes cancelled runs. Verify this matches the team's intent (cancelled workflows stay silent). - Should the success message remain generic ("Packages have been published") or include the
publishedPackagesoutput for richer context, as the old job had access to?
generated using the pr-review workflow in 20 turns
give feedback with reactions 👍 👎
Objective
Merging without a changeset currently posts "Publishing failed" to Slack, even when nothing was meant to publish (renovate config, workflow files). Split the notify job in two: post on an actual publish, post on an actual
versionjob failure, and stay quiet otherwise.Extracted from #7019 (left open for the tarball-check discussion), cut back to the shape Ryan suggested in thread.