diff options
-rw-r--r-- | .github/workflows/backport.yaml | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml index 54dce5bc..cf317770 100644 --- a/.github/workflows/backport.yaml +++ b/.github/workflows/backport.yaml | |||
@@ -2,23 +2,13 @@ name: Backport labeled merged pull requests | |||
2 | on: | 2 | on: |
3 | pull_request_target: | 3 | pull_request_target: |
4 | types: [closed] | 4 | types: [closed] |
5 | issue_comment: | ||
6 | types: [created] | ||
7 | jobs: | 5 | jobs: |
8 | build: | 6 | build: |
9 | name: Create backport PRs | 7 | name: Create backport PRs |
10 | runs-on: ubuntu-latest | 8 | runs-on: ubuntu-latest |
11 | # Only run when pull request is merged | 9 | # Only run when pull request is merged |
12 | # or when a comment containing `/backport` is created | 10 | # or when a comment containing `/backport` is created |
13 | if: > | 11 | if: github.event.pull_request.merged |
14 | ( | ||
15 | github.event_name == 'pull_request_target' && | ||
16 | github.event.pull_request_target.merged | ||
17 | ) || ( | ||
18 | github.event_name == 'issue_comment' && | ||
19 | github.event.issue.pull_request_target && | ||
20 | contains(github.event.comment.body, '/backport') | ||
21 | ) | ||
22 | steps: | 12 | steps: |
23 | - uses: actions/checkout@v2 | 13 | - uses: actions/checkout@v2 |
24 | with: | 14 | with: |