Skip to content

Tweaks for hotfix cherry-pick workflow#4166

Open
paulmedynski wants to merge 1 commit intomainfrom
dev/paul/hotfix-action
Open

Tweaks for hotfix cherry-pick workflow#4166
paulmedynski wants to merge 1 commit intomainfrom
dev/paul/hotfix-action

Conversation

@paulmedynski
Copy link
Copy Markdown
Contributor

Description

  • Conflicts during cherry-pick will now create the PR as a Draft.
  • Fixed formatting of the sample git commands in the PR description.

@paulmedynski paulmedynski added this to the 7.1.0-preview1 milestone Apr 8, 2026
@paulmedynski paulmedynski requested a review from a team as a code owner April 8, 2026 13:04
@paulmedynski paulmedynski added the Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems. label Apr 8, 2026
Copilot AI review requested due to automatic review settings April 8, 2026 13:04
@github-project-automation github-project-automation bot moved this to To triage in SqlClient Board Apr 8, 2026
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Apr 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 printf to avoid literal \n sequences 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 ]

Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

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"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Engineering Use this for issues that are targeted for changes in the 'eng' folder or build systems.

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants