You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
benchmarks.yml: Fix PR branch checkout when triggered by comment (#1998)
This commit resolves an issue in our GitHub Actions workflow where the correct PR branch was not being checked out when the workflow was triggered by an 'issue_comment' event. Previously, the workflow was set up to handle the 'pull_request_target' event correctly, but it did not account for the different context provided by 'issue_comment'.
The fix involves adding conditional steps in the workflow to handle the 'issue_comment' event. When the workflow is triggered by an 'issue_comment', it now uses the GitHub API to extract the PR number from the comment context. This information is then used to retrieve the PR details, including the head branch and the repository name. With these details, the workflow can now correctly check out the PR branch associated with the issue comment. This ensures that our benchmarks and other PR-related checks run against the appropriate branch, regardless of the triggering event.
0 commit comments