We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 548cc4f commit d60771fCopy full SHA for d60771f
.github/workflows/backport.yml
@@ -1,15 +1,21 @@
1
name: backport
2
3
on:
4
- pull_request:
+ # Note that `pull_request_target` has security implications:
5
+ # https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
6
+ # In particular:
7
+ # - Only allow triggers that can be used only be trusted users
8
+ # - Don't execute any code from the target branch
9
+ # - Don't use cache
10
+ pull_request_target:
11
types: [labeled]
12
13
# Set permissions at the job level.
14
permissions: {}
15
16
jobs:
17
backport:
- if: ${{ startsWith(github.event.label.name, 'backport ') }}
18
+ if: startsWith(github.event.label.name, 'backport ') && github.event.pull_request.merged
19
runs-on: ubuntu-latest
20
permissions:
21
contents: write
0 commit comments