Skip to content

Commit

Permalink
Merge pull request #400 from jschmid1/patch-1
Browse files Browse the repository at this point in the history
fix: change condition to start a backport by comment
  • Loading branch information
korthout authored Nov 24, 2023
2 parents 51a96b5 + 197149d commit b149012
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest

# Only run when pull request is merged
# or when a comment containing `/backport` is created
# or when a comment starting with `/backport` is created
if: >
(
github.event_name == 'pull_request' &&
github.event.pull_request.merged
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '/backport')
startsWith(github.event.comment.body, '/backport')
)
steps:
- uses: actions/checkout@v4
- name: Create backport pull requests
uses: korthout/backport-action@v2
uses: korthout/backport-action@v2
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
runs-on: ubuntu-latest
# Only run when pull request is merged
# or when a comment containing `/backport` is created by someone other than the
# or when a comment starting with `/backport` is created by someone other than the
# https://github.com/backport-action bot user (user id: 97796249). Note that if you use your
# own PAT as `github_token`, that you should replace this id with yours.
if: >
Expand All @@ -90,7 +90,7 @@ jobs:
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.comment.user.id != 97796249 &&
contains(github.event.comment.body, '/backport')
startsWith(github.event.comment.body, '/backport')
)
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit b149012

Please sign in to comment.