Skip to content

Commit a244610

Browse files
ci: Fix authorization logic in pull_request_target workflows (#224)
Co-authored-by: Armel Soro <asoro@redhat.com>
1 parent 1b06a23 commit a244610

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/pre-commit.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
# see list of approvers in OWNERS file
2222
environment:
2323
${{ (github.event.pull_request.head.repo.full_name == github.repository ||
24-
contains(fromJSON('["coreydaley","gazarenkov","kadel","nickboldt","rm3l","kim-tsao","Fortune-Ndlovu","subhashkhileri","zdrapela","openshift-cherrypick-robot", "Fortune-Ndlovu", "subhashkhileri", "zdrapela"]'), github.actor)) && 'internal' || 'external' }}
24+
contains(fromJSON('["coreydaley","gazarenkov","kadel","nickboldt","rm3l","kim-tsao","Fortune-Ndlovu","subhashkhileri","zdrapela","openshift-cherrypick-robot", "Fortune-Ndlovu", "subhashkhileri", "zdrapela"]'), github.event.pull_request.user.login)) && 'internal' || 'external' }}
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: approved
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
fetch-depth: 0
4444
repository: ${{github.event.pull_request.head.repo.full_name}}
45-
ref: ${{ github.event.pull_request.head.ref }}
45+
ref: ${{ github.event.pull_request.head.sha }}
4646

4747
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
4848
with:

0 commit comments

Comments
 (0)