Skip to content

Commit

Permalink
added comments and error propagation for release locking
Browse files Browse the repository at this point in the history
  • Loading branch information
enekofb committed Aug 15, 2023
1 parent e74431f commit b0fb870
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/prepare-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ jobs:
${{ steps.github_release.outputs.changelog }}
token: ${{ secrets.WEAVE_GITOPS_BOT_ACCESS_TOKEN }}
labels: "exclude from release notes"
- name: Lock Release PR Merge
# 'Lock Release PR Merge' sets 'release' status check with pending state to avoid accidentally merging the release PR. See ../../doc/incidents/issues-3907 for full context.
- name: Lock Release PR
run: |
curl --request POST \
curl --fail --request POST \
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ steps.create-pull-request.outputs.pull-request-head-sha }} \
--header 'authorization: Bearer ${{ secrets.WEAVE_GITOPS_BOT_ACCESS_TOKEN }}' \
--header 'content-type: application/json' \
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,10 @@ jobs:
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
# 'Unlock Release PR Merge' sets 'release' status check state to success to unlock merging the release PR. See ../../doc/incidents/issues-3907 for full context.
- name: Unlock Release PR Merge
run: |
curl --request POST \
curl --fail --request POST \
--url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.pull_request.head.sha }} \
--header 'authorization: Bearer ${{ secrets.WEAVE_GITOPS_BOT_ACCESS_TOKEN }}' \
--header 'content-type: application/json' \
Expand Down

0 comments on commit b0fb870

Please sign in to comment.