File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,12 +130,21 @@ jobs:
130130 git push -f origin "origin/main:${SIGSTORE_PIN_REQUIREMENTS_BRANCH}"
131131
132132 - name : Open pull request
133- uses : peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
134- with :
135- title : |
136- Update pinned requirements for ${{ env.SIGSTORE_RELEASE_TAG }}
137- body : |
138- Pins dependencies for <https://github.com/sigstore/sigstore-python/releases/tag/${{ env.SIGSTORE_RELEASE_TAG }}>.
139- base : main
140- branch : ${{ env.SIGSTORE_PIN_REQUIREMENTS_BRANCH }}
141- delete-branch : true
133+ env :
134+ GH_TOKEN : ${{ github.token }}
135+ run : |
136+ # Try to create a new PR, or update if it already exists
137+ # NOTE: Branch deletion after merge is handled by repository settings
138+ PR_TITLE="Update pinned requirements for ${SIGSTORE_RELEASE_TAG}"
139+ PR_BODY="Pins dependencies for <https://github.com/sigstore/sigstore-python/releases/tag/${SIGSTORE_RELEASE_TAG}>."
140+
141+ if ! gh pr create \
142+ --title "${PR_TITLE}" \
143+ --body "${PR_BODY}" \
144+ --base main \
145+ --head "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}"; then
146+ # PR already exists, update it
147+ gh pr edit "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}" \
148+ --title "${PR_TITLE}" \
149+ --body "${PR_BODY}"
150+ fi
You can’t perform that action at this time.
0 commit comments