Skip to content

Commit

Permalink
[PR #8304/88c80c14 backport][3.9] Check for backports in CI (#8305)
Browse files Browse the repository at this point in the history
**This is a backport of PR #8304 as merged into master
(88c80c1).**

Co-authored-by: Sam Bull <[email protected]>
  • Loading branch information
patchback[bot] and Dreamsorcerer authored Apr 7, 2024
1 parent cebe526 commit 292d961
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Labels
on:
pull_request:
branches:
- 'master'
types: [labeled, opened, synchronize, reopened, unlabeled]

jobs:
backport:
runs-on: ubuntu-latest
name: Backport label added
steps:
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number
});
if (!pr.data.labels.find(l => l.name.startsWith("backport")))
process.exit(1);

0 comments on commit 292d961

Please sign in to comment.