Skip release PR in PR status workflow example - #2240
Conversation
|
✅ Deploy Preview for changesets ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2240 +/- ##
=======================================
Coverage 84.53% 84.53%
=======================================
Files 80 80
Lines 3168 3168
Branches 892 890 -2
=======================================
Hits 2678 2678
Misses 433 433
Partials 57 57 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
beeequeue
left a comment
There was a problem hiding this comment.
should we also add this to the pr-comment step?
| jobs: | ||
| pr-status: | ||
| # recommended: skip the release pull request, as it never has changesets | ||
| if: ${{ !startsWith(github.event.pull_request.head.ref, 'changeset-release/') }} |
There was a problem hiding this comment.
| if: ${{ !startsWith(github.event.pull_request.head.ref, 'changeset-release/') }} | |
| if: ${{ !startsWith(github.head_ref, 'changeset-release/') }} |
slightly shorter version
There was a problem hiding this comment.
Applied the github.head_ref suggestion, thanks.
For pr-comment: it is not needed.
It's a separate job with needs: pr-status, and GitHub skips dependents when a needs job is skipped (unless they override with always()).
Also combined the if in the pull_request note above the snippet.
The example comments on every pull request, including the release PR where
changeset versionhas consumed all changesets, so the comment always reports that none is present.This adds an
ifcondition to thepr-statusjob skippingchangeset-release/*branches, matching what the Changesets GitHub Bot does internally.