ci: resolve PR number from commit SHA using gh CLI#37
Merged
damaz91 merged 2 commits intoJul 2, 2026
Conversation
ptiper
approved these changes
Jul 2, 2026
nicholasjameshall
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the central
reusable-governance.ymlworkflow to resolve the PR number from the commit SHA using theghCLI if it cannot be resolved from the event context.This is necessary because for workflows triggered by
workflow_runwhere the triggering workflow was run from a fork, thegithub.event.workflow_run.pull_requestsarray is empty due to GitHub security policies, preventing the caller workflow from resolving the PR number.Resolving it from the commit SHA on the base repository allows us to support external contributors' PRs.
Category (Required)
Please select one or more categories that apply to this change.
ucp-schematool (resolver, linter, validator). (Requires Maintainer approval)Related Issues
None.
Checklist
!for breaking changes).Screenshots / Logs (if applicable)
TAG=agy
CONV=1ef97e2b-e6b6-4be9-9bae-dfc6609dd7c1