ci: fix release pr lookup in the changelog workflow#2039
Merged
Conversation
The head filter of the pulls API needs the 'owner:' prefix. Without it GitHub ignores the filter and returns the newest open PR, whose body then got the release notes appended. Also guard against patching a PR whose head is not the release branch.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2039 +/- ##
==========================================
+ Coverage 99.40% 99.47% +0.06%
==========================================
Files 82 82
Lines 3025 3025
Branches 533 533
==========================================
+ Hits 3007 3009 +2
+ Misses 15 13 -2
Partials 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
The changelog workflow looked up the release PR via
pulls?head=v2.0.0— but GitHub'sheadfilter requires theowner:prefix. Without it the filter is ignored, the API returns the newest open PR, and the workflow appended the v2.0.0 release notes to that PR's body (this happened to several feature PRs; bodies are being cleaned up).head=CodeDredd:v${newVersion}&state=openTogether with deleting the stale
v2.0.0branch (created from an old main state), the next main push will regenerate the release branch + draft release PR from the current state.