Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
fix: 404 from branch protection jobs
Browse files Browse the repository at this point in the history
* github-script v1 was getting a 404 for the branch protection endpoint
* upgraded github-script to v5
* updated calls for breaking changes
  • Loading branch information
aswanson-nr committed Jan 25, 2022
1 parent bf89fa1 commit dc2690c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/fetch-quickstarts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:

- name: Temporarily disable branch protection
id: disable-branch-protection
uses: actions/github-script@v1
uses: actions/github-script@v5
with:
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
previews: luke-cage-preview
script: |
const result = await github.repos.updateBranchProtection({
const result = await github.rest.repos.updateBranchProtection({
owner: context.repo.owner,
repo: context.repo.repo,
branch: 'main',
Expand Down Expand Up @@ -78,12 +78,12 @@ jobs:
- name: Re-enable branch protection
id: enable-branch-protection
if: always()
uses: actions/github-script@v1
uses: actions/github-script@v5
with:
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
previews: luke-cage-preview
script: |
const result = await github.repos.updateBranchProtection({
const result = await github.rest.repos.updateBranchProtection({
owner: context.repo.owner,
repo: context.repo.repo,
branch: 'main',
Expand Down

0 comments on commit dc2690c

Please sign in to comment.