diff --git a/.github/workflows/auto-approve-backports.yml b/.github/workflows/auto-approve-backports.yml index 781e94cc01410..84d85c2c84694 100644 --- a/.github/workflows/auto-approve-backports.yml +++ b/.github/workflows/auto-approve-backports.yml @@ -12,8 +12,8 @@ jobs: name: Auto-approve backport runs-on: ubuntu-latest if: | - contains(github.event.pull_request_target.labels.*.name, 'backport') && - github.event.pull_request_target.user.login == 'kibanamachine' + startsWith(github.event.pull_request.head.ref, 'backport') && + github.event.pull_request.user.login == 'kibanamachine' permissions: pull-requests: write steps: