diff --git a/.github/copy-issue-labels-to-pr.py b/.github/copy-issue-labels-to-pr.py index 2dd23bb278..503055d485 100755 --- a/.github/copy-issue-labels-to-pr.py +++ b/.github/copy-issue-labels-to-pr.py @@ -21,7 +21,7 @@ def get_pr(event): # SHA that *is* there. # Get head SHA from event JSON - pr_head_sha = event["check_suite"]["head_sha"] + pr_head_sha = event["pull_request"]["head"]["sha"] # Find the repo PR that matches the head SHA we found return {pr.head.sha: pr for pr in repo.get_pulls()}[pr_head_sha] diff --git a/.github/workflows/apply-issue-labels-to-pr.yml b/.github/workflows/apply-issue-labels-to-pr.yml index 28823caf7d..32ac2a96b2 100644 --- a/.github/workflows/apply-issue-labels-to-pr.yml +++ b/.github/workflows/apply-issue-labels-to-pr.yml @@ -12,4 +12,4 @@ jobs: - uses: actions/checkout@v3 - name: Run label script - run: pip install PyGithub && ./.github/copy-issue-labels-to-pr.py ${{ secrets.GITHUB_TOKEN }} $GITHUB_REPOSITORY $GITHUB_EVENT_PATH + run: pip install PyGithub && .github/copy-issue-labels-to-pr.py ${{ secrets.GITHUB_TOKEN }} $GITHUB_REPOSITORY $GITHUB_EVENT_PATH