Skip to content

Commit

Permalink
updated lock_branch.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Jul 30, 2023
1 parent a7d4bb2 commit 69946b0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/lock_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
#
# See adjacent counterpart workflow unlock_brn

# XXX: Requires a PAT token to avoid this error:
#
# {
# "message": "Resource not accessible by integration",
# "documentation_url": "https://docs.github.com/rest/branches/branch-protection#update-branch-protection"
# }

---
name: Lock Branch

Expand All @@ -40,7 +47,8 @@ defaults:
env:
BRANCH: ${{ inputs.branch || github.event.inputs.branch }}
REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# XXX: Requires PAT loaded to Secrets for permission
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# XXX: API requires these fields but this is bad - could wipe out existing values
PAYLOAD: '{"required_status_checks": null, "enforce_admins": false, "required_pull_request_reviews": null, "restrictions": null, "lock_branch": true}'

Expand Down

0 comments on commit 69946b0

Please sign in to comment.