Skip to content

ci: resolve PR number from commit SHA using gh CLI#37

Merged
damaz91 merged 2 commits into
Universal-Commerce-Protocol:mainfrom
damaz91:resolve-pr-from-sha
Jul 2, 2026
Merged

ci: resolve PR number from commit SHA using gh CLI#37
damaz91 merged 2 commits into
Universal-Commerce-Protocol:mainfrom
damaz91:resolve-pr-from-sha

Conversation

@damaz91

@damaz91 damaz91 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Description

This PR updates the central reusable-governance.yml workflow to resolve the PR number from the commit SHA using the gh CLI if it cannot be resolved from the event context.

This is necessary because for workflows triggered by workflow_run where the triggering workflow was run from a fork, the github.event.workflow_run.pull_requests array 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.

  • Core Protocol: Changes to the base communication layer, global context, or breaking refactors. (Requires Technical Council approval)
  • Governance/Contributing: Updates to GOVERNANCE.md, CONTRIBUTING.md, or CODEOWNERS. (Requires Governance Council approval)
  • Capability: New schemas (Discovery, Cart, etc.) or extensions. (Requires Maintainer approval)
  • Documentation: Updates to README, or documentations regarding schema or capabilities. (Requires Maintainer approval)
  • Infrastructure: CI/CD, Linters, or build scripts. (Requires DevOps Maintainer approval)
  • Maintenance: Version bumps, lockfile updates, or minor bug fixes. (Requires DevOps Maintainer approval)
  • SDK: Language-specific SDK updates and releases. (Requires DevOps Maintainer approval)
  • Samples / Conformance: Maintaining samples and the conformance suite. (Requires Maintainer approval)
  • UCP Schema: Changes to the ucp-schema tool (resolver, linter, validator). (Requires Maintainer approval)
  • Community Health (.github): Updates to templates, workflows, or org-level configs. (Requires DevOps Maintainer approval)

Related Issues

None.

Checklist

  • I have followed the Contributing Guide (including Conventional Commits title requirements and ! for breaking changes).
  • I have updated the documentation (if applicable).
  • My changes pass all local linting and formatting checks.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • (For Core/Capability) I have included/updated the relevant JSON schemas.
  • I have regenerated Python Pydantic models by running generate_models.sh under python_sdk.

Screenshots / Logs (if applicable)

TAG=agy
CONV=1ef97e2b-e6b6-4be9-9bae-dfc6609dd7c1

@damaz91 damaz91 requested a review from a team as a code owner July 2, 2026 12:05
@damaz91 damaz91 requested review from aksbro-gpu and ptiper July 2, 2026 12:05
@damaz91 damaz91 merged commit 4496c7c into Universal-Commerce-Protocol:main Jul 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants