Skip to content

Commit

Permalink
Merge pull request #4678 from nebulab/waiting-for-dev/automatic_backport
Browse files Browse the repository at this point in the history
GitHub Action to automatically create backport PRs
  • Loading branch information
waiting-for-dev authored Oct 20, 2022
2 parents 425c82f + 05db97f commit 5f628dd
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
pull_request_target:
types: ["labeled", "closed"]

jobs:
backport:
name: Backport PR
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true
&& contains(github.event.pull_request.labels.*.name, 'Needs Backport')
&& (
(github.event.action == 'labeled' && github.event.label.name == 'Needs Backport')
|| (github.event.action == 'closed')
)
steps:
- name: Backport Action
uses: sqren/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
auto_backport_label_prefix: Needs Backport-
add_original_reviewers: true

- name: Info log
if: ${{ success() }}
run: cat ~/.backport/backport.info.log

- name: Debug log
if: ${{ failure() }}
run: cat ~/.backport/backport.debug.log

0 comments on commit 5f628dd

Please sign in to comment.