[Backport to llvm_release_210] Fix error propagation in parseSPIRV #75
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cleanup Backport Branches | |
on: | |
pull_request: | |
types: [closed] | |
permissions: | |
contents: write | |
jobs: | |
cleanup: | |
if: > | |
github.event.pull_request.head.repo.full_name == github.repository && | |
startsWith(github.event.pull_request.head.ref, 'backport/pr-') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Delete branch | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const branch = context.payload.pull_request.head.ref; | |
try { | |
await github.rest.git.deleteRef({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: `heads/${branch}` | |
}); | |
console.log(`Success. Deleted '${branch}'`); | |
} catch (error) { | |
if (error.status === 422) { | |
console.log(`Branch '${branch}' not found`); | |
} else { | |
throw error; | |
} | |
} |