diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 04ccdbd..c2db972 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -13,7 +13,7 @@ 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' && @@ -21,9 +21,9 @@ jobs: ) || ( 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 \ No newline at end of file + uses: korthout/backport-action@v2 diff --git a/README.md b/README.md index 65891be..bbb4b93 100644 --- a/README.md +++ b/README.md @@ -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: > @@ -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