Skip to content

Commit

Permalink
fix(NA): checking pr author through github.head_ref instead of pull_r…
Browse files Browse the repository at this point in the history
…equest event on auto backport approve ghaction (elastic#160807)

The action is getting skipped on backports and I suspect we were not
checking correctly for the pr author. I changed it a little to make sure
we are getting the pr author through the head ref so we can validate is
being created by kibanamachine.

(cherry picked from commit c7b2d2b)
  • Loading branch information
mistic committed Jun 28, 2023
1 parent 8760340 commit e255275
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/auto-approve-backports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ on:
types:
- opened

env:
NODE_ENV: kibana-github-action

jobs:
approve:
name: Auto-approve backport
runs-on: ubuntu-latest
if: |
contains(github.event.pull_request.labels.*.name, 'backport') &&
github.event.pull_request.user.login == 'kibanamachine'
contains(github.head_ref, 'kibanamachine:backport')
permissions:
pull-requests: write
steps:
Expand Down

0 comments on commit e255275

Please sign in to comment.