From 460292cf3263f309b91ecd3b2d4f7c7385c2feed Mon Sep 17 00:00:00 2001 From: Armel Soro Date: Wed, 27 Aug 2025 20:00:37 +0200 Subject: [PATCH] ci: Fix authorization logic in pull_request_target workflows --- .github/workflows/pre-commit.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 46aa2aeb..969c33d2 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -21,7 +21,7 @@ jobs: # see list of approvers in OWNERS file environment: ${{ (github.event.pull_request.head.repo.full_name == github.repository || - contains(fromJSON('["coreydaley","gazarenkov","kadel","nickboldt","rm3l","kim-tsao","Fortune-Ndlovu","subhashkhileri","zdrapela","openshift-cherrypick-robot", "Fortune-Ndlovu", "subhashkhileri", "zdrapela"]'), github.actor)) && 'internal' || 'external' }} + 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' }} runs-on: ubuntu-latest steps: - name: approved @@ -42,7 +42,7 @@ jobs: with: fetch-depth: 0 repository: ${{github.event.pull_request.head.repo.full_name}} - ref: ${{ github.event.pull_request.head.ref }} + ref: ${{ github.event.pull_request.head.sha }} - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 with: