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 97c5978 commit 715ff72Copy full SHA for 715ff72
.github/workflows/backport.yml
@@ -7,12 +7,22 @@ on:
7
8
jobs:
9
backport:
10
- if: ${{ contains(github.event.label.name, 'backport') }}
+ name: Backport
11
runs-on: ubuntu-latest
12
+ # Only react to merged PRs for security reasons.
13
+ # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target.
14
+ if: >
15
+ github.event.pull_request.merged
16
+ && (
17
+ github.event.action == 'closed'
18
+ || (
19
+ github.event.action == 'labeled'
20
+ && contains(github.event.label.name, 'backport')
21
+ )
22
23
permissions:
24
contents: write
25
pull-requests: write
- name: Backport
26
steps:
27
- name: GitHub App token
28
id: github_app_token
0 commit comments