Skip to content

Commit

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

# Backport

This will backport the following commits from `main` to `7.17`:
- [fix(NA): checking pr author through github.head_ref instead of
pull_request event on auto backport approve ghaction
(#160807)](#160807)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Tiago
Costa","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-06-28T19:56:11Z","message":"fix(NA):
checking pr author through github.head_ref instead of pull_request event
on auto backport approve ghaction (#160807)\n\nThe action is getting
skipped on backports and I suspect we were not\r\nchecking correctly for
the pr author. I changed it a little to make sure\r\nwe are getting the
pr author through the head ref so we can validate is\r\nbeing created by
kibanamachine.","sha":"c7b2d2be8a558b906b3924ec947bd14cd3a963e6","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","backport:all-open","v8.10.0"],"number":160807,"url":"https://github.com/elastic/kibana/pull/160807","mergeCommit":{"message":"fix(NA):
checking pr author through github.head_ref instead of pull_request event
on auto backport approve ghaction (#160807)\n\nThe action is getting
skipped on backports and I suspect we were not\r\nchecking correctly for
the pr author. I changed it a little to make sure\r\nwe are getting the
pr author through the head ref so we can validate is\r\nbeing created by
kibanamachine.","sha":"c7b2d2be8a558b906b3924ec947bd14cd3a963e6"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160807","number":160807,"mergeCommit":{"message":"fix(NA):
checking pr author through github.head_ref instead of pull_request event
on auto backport approve ghaction (#160807)\n\nThe action is getting
skipped on backports and I suspect we were not\r\nchecking correctly for
the pr author. I changed it a little to make sure\r\nwe are getting the
pr author through the head ref so we can validate is\r\nbeing created by
kibanamachine.","sha":"c7b2d2be8a558b906b3924ec947bd14cd3a963e6"}}]}]
BACKPORT-->

Co-authored-by: Tiago Costa <[email protected]>
  • Loading branch information
kibanamachine and mistic authored Jun 28, 2023
1 parent 8760340 commit 853af70
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 853af70

Please sign in to comment.