Skip to content

Commit 720fc67

Browse files
Copilotwoodruffw
andcommitted
Refactor: extract PR title and body into variables
Co-authored-by: woodruffw <[email protected]>
1 parent ac7807d commit 720fc67

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/pin-requirements.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,17 @@ jobs:
134134
GH_TOKEN: ${{ github.token }}
135135
run: |
136136
# 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+
137141
if ! gh pr create \
138-
--title "Update pinned requirements for ${SIGSTORE_RELEASE_TAG}" \
139-
--body "Pins dependencies for <https://github.com/sigstore/sigstore-python/releases/tag/${SIGSTORE_RELEASE_TAG}>." \
142+
--title "${PR_TITLE}" \
143+
--body "${PR_BODY}" \
140144
--base main \
141145
--head "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}"; then
142146
# PR already exists, update it
143147
gh pr edit "${SIGSTORE_PIN_REQUIREMENTS_BRANCH}" \
144-
--title "Update pinned requirements for ${SIGSTORE_RELEASE_TAG}" \
145-
--body "Pins dependencies for <https://github.com/sigstore/sigstore-python/releases/tag/${SIGSTORE_RELEASE_TAG}>."
148+
--title "${PR_TITLE}" \
149+
--body "${PR_BODY}"
146150
fi

0 commit comments

Comments
 (0)