Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/cherry-pick-to-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ lookup_milestone() {
MILESTONE_ARG=""
MILESTONE_NOTE=""

if gh api "repos/${GITHUB_REPOSITORY}/milestones" --paginate \
if gh api "repos/${GITHUB_REPOSITORY}/milestones" --method GET --paginate \
--field state=open --jq '.[].title' | grep -qx "${version}"; then
MILESTONE_ARG="--milestone ${version}"
echo "Milestone '${version}' found."
Expand Down
4 changes: 4 additions & 0 deletions .github/scripts/tests/cherry-pick-to-release.bats
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ STUB
[ "$status" -eq 0 ]
# Verify the git fetch targeted release/7.0.
grep -q "GIT: fetch origin release/7.0" "${STUB_DIR}/git.log"
# Milestone lookup must use GET to avoid accidentally POSTing to the create endpoint.
grep "GH: api repos/dotnet/SqlClient/milestones" "${STUB_DIR}/gh.log" | grep -q "\-\-method GET"
}

@test "derives release/8.0 from version 8.0.0" {
Expand Down Expand Up @@ -259,6 +261,8 @@ STUB
run bash "${SCRIPT}"
[ "$status" -eq 0 ]
[[ "$output" == *"does not exist"* ]]
# Milestone lookup must use GET to avoid accidentally POSTing to the create endpoint.
grep "GH: api repos/dotnet/SqlClient/milestones" "${STUB_DIR}/gh.log" | grep -q "\-\-method GET"
}

# ── Conflict handling ───────────────────────────────────────────────────────
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cherry-pick-hotfix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
versions: ${{ steps.extract.outputs.versions }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
# Only the scripts directory is needed; skip full history.
sparse-checkout: .github/scripts
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
# Full history is required so the merge commit and target branch are available
# for the cherry-pick operation.
Expand Down
Loading