From 96de51a4fc4861668a3e7570b0a95136ca6f2781 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Nov 2025 21:15:22 +0000 Subject: [PATCH 1/3] Initial plan From ac7807d66880b670842799b3ff522381b6a7974b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Nov 2025 21:19:01 +0000 Subject: [PATCH 2/3] Replace peter-evans/create-pull-request with gh pr create Co-authored-by: woodruffw <3059210+woodruffw@users.noreply.github.com> --- .github/workflows/pin-requirements.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pin-requirements.yml b/.github/workflows/pin-requirements.yml index 9acccb16..7491b569 100644 --- a/.github/workflows/pin-requirements.yml +++ b/.github/workflows/pin-requirements.yml @@ -130,12 +130,17 @@ jobs: git push -f origin "origin/main:${SIGSTORE_PIN_REQUIREMENTS_BRANCH}" - name: Open pull request - uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9 - with: - title: | - Update pinned requirements for ${{ env.SIGSTORE_RELEASE_TAG }} - body: | - Pins dependencies for . - base: main - branch: ${{ env.SIGSTORE_PIN_REQUIREMENTS_BRANCH }} - delete-branch: true + env: + GH_TOKEN: ${{ github.token }} + run: | + # Try to create a new PR, or update if it already exists + if ! gh pr create \ + --title "Update pinned requirements for ${SIGSTORE_RELEASE_TAG}" \ + --body "Pins dependencies for ." \ + --base main \ + --head "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}"; then + # PR already exists, update it + gh pr edit "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}" \ + --title "Update pinned requirements for ${SIGSTORE_RELEASE_TAG}" \ + --body "Pins dependencies for ." + fi From 720fc67e5be53ab36918c1936e4fd028b2779385 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 24 Nov 2025 21:20:33 +0000 Subject: [PATCH 3/3] Refactor: extract PR title and body into variables Co-authored-by: woodruffw <3059210+woodruffw@users.noreply.github.com> --- .github/workflows/pin-requirements.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pin-requirements.yml b/.github/workflows/pin-requirements.yml index 7491b569..9ee7a75d 100644 --- a/.github/workflows/pin-requirements.yml +++ b/.github/workflows/pin-requirements.yml @@ -134,13 +134,17 @@ jobs: GH_TOKEN: ${{ github.token }} run: | # Try to create a new PR, or update if it already exists + # NOTE: Branch deletion after merge is handled by repository settings + PR_TITLE="Update pinned requirements for ${SIGSTORE_RELEASE_TAG}" + PR_BODY="Pins dependencies for ." + if ! gh pr create \ - --title "Update pinned requirements for ${SIGSTORE_RELEASE_TAG}" \ - --body "Pins dependencies for ." \ + --title "${PR_TITLE}" \ + --body "${PR_BODY}" \ --base main \ --head "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}"; then # PR already exists, update it gh pr edit "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}" \ - --title "Update pinned requirements for ${SIGSTORE_RELEASE_TAG}" \ - --body "Pins dependencies for ." + --title "${PR_TITLE}" \ + --body "${PR_BODY}" fi