Open
Conversation
…l commands to render with proper newlines.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the hotfix cherry-pick automation to better reflect conflict states in GitHub by creating draft PRs on conflict, and fixes PR-body formatting to ensure the manual-resolution command block renders with real newlines.
Changes:
- Create conflict PRs as Draft (
gh pr create --draft) when cherry-pick conflicts occur. - Rebuild the conflict PR body using
printfto avoid literal\nsequences and ensure proper multiline formatting. - Add a Bats test to validate the conflict PR body contains real newlines (not backslash-n).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/scripts/cherry-pick-to-release.sh | Marks conflict PRs as draft and builds the conflict PR body via printf to ensure correct newline formatting. |
| .github/scripts/tests/cherry-pick-to-release.bats | Adds coverage to verify the conflict PR body contains real newlines and correctly formatted command lines. |
|
|
||
| run bash "${SCRIPT}" | ||
| [ "$status" -eq 0 ] | ||
|
|
There was a problem hiding this comment.
The PR’s stated behavior change is that conflict PRs are created as drafts, but this new test only inspects the --body argument. Add an assertion that gh pr create was invoked with --draft (e.g., via ${STUB_DIR}/gh.log) so the behavior is covered and won’t regress.
Suggested change
| # gh pr create must have been logged and invoked with --draft. | |
| [ -f "${STUB_DIR}/gh.log" ] | |
| grep -F -- "--draft" "${STUB_DIR}/gh.log" |
mdaigle
approved these changes
Apr 8, 2026
priyankatiwari08
approved these changes
Apr 9, 2026
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.
Description