Skip to content

ci: skip release candidate if generated reference match current release#575

Open
zimeg wants to merge 1 commit into
mainfrom
fix/rc-no-changes-commit
Open

ci: skip release candidate if generated reference match current release#575
zimeg wants to merge 1 commit into
mainfrom
fix/rc-no-changes-commit

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented Jun 4, 2026

Changelog

N/A - But with hopes our workflow runs appear with more green checks.

Summary

This PR fixes the release workflow attempting to create an RC PR if generated changes match what's current on main branch. This happens during the release process between merge and tag or if no semver labels exist on PRs since a latest tag.

Preview

Error: https://github.com/slackapi/slack-cli/actions/runs/26916634889/job/79407765870

Note: We might not test this until next RC candidate merges unless we avoid adding a label before merge perhaps? I do not know!

Notes

  • The make rc command still errors if a commit isn't created (no changes needed for docs) to show the RC failed and matches stables instead. I comment that our check for this is interesting...

Requirements

@zimeg zimeg force-pushed the fix/rc-no-changes-commit branch from 5d55f92 to d8aa5c4 Compare June 4, 2026 04:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.69%. Comparing base (f0e47ee) to head (ad3d90b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #575      +/-   ##
==========================================
+ Coverage   71.66%   71.69%   +0.03%     
==========================================
  Files         226      226              
  Lines       19148    19148              
==========================================
+ Hits        13723    13729       +6     
+ Misses       4218     4214       -4     
+ Partials     1207     1205       -2     

☔ 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.

The release workflow re-triggers on main when its own PR merges,
causing `make rc` to fail with "nothing to commit" since docs are
already up to date. Check if the computed NEXT_VERSION already
appears in the install docs before proceeding.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg force-pushed the fix/rc-no-changes-commit branch from d8aa5c4 to ad3d90b Compare June 4, 2026 04:14
Copy link
Copy Markdown
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

🔮 A comment of the current approach - I don't think this is rushed to merge until next release and it shouldn't be blocking a release either!

Comment on lines +87 to +92
# Skip if docs already reference this version
if grep -q "Using slack v${NEXT_VERSION}" docs/guides/installing-the-slack-cli-for-mac-and-linux.md; then
echo "Docs already at v$NEXT_VERSION, nothing to release"
echo "has_changes=false" >> "$GITHUB_OUTPUT"
exit 0
fi
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

🪬 thought: Curious of perhaps recommended place to search for the latest version after discussion with @lukegalbraithrussell and @srtaalej earlier! This current approach isn't certain IMHO.

👾 ramble: Overall I prefer checking for an expected version here to skip the "commit" and "PR" steps following if no changes are found without adding to those steps!

@zimeg zimeg self-assigned this Jun 4, 2026
@zimeg zimeg added semver:patch Use on pull requests to describe the release version increment build M-T: Changes to compilation and CI processes labels Jun 4, 2026
@zimeg zimeg added this to the Next Release milestone Jun 4, 2026
@zimeg zimeg changed the title fix: skip release workflow when triggered by its own merge ci: skip release candidate if generated reference match current release Jun 4, 2026
@zimeg zimeg marked this pull request as ready for review June 4, 2026 04:28
@zimeg zimeg requested a review from a team as a code owner June 4, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build M-T: Changes to compilation and CI processes semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant