Skip to content

Commit

Permalink
Fixes script to pull the correct sha
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <[email protected]>
  • Loading branch information
DarshitChanpura committed Sep 7, 2023
1 parent 0acda3e commit 9a65733
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/copy-issue-labels-to-pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apply-issue-labels-to-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9a65733

Please sign in to comment.