Skip to content

ci: add integration-result workflow for managing labels - #8516

Open
joshblack wants to merge 7 commits into
mainfrom
ci/add-integration-result-workflow
Open

joshblack wants to merge 7 commits into
mainfrom
ci/add-integration-result-workflow

Conversation

@joshblack

@joshblack joshblack commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

No linked issue.

Add an alternative to our check-for-integration-comment.yml workflow that applies labels based on the result of github-ui status checks. This uses status events instead of checking integration comments directly.

The label job runs for github-ui status events with a success, failure, or error state. Events with a Skipped or Manual override description are excluded so manual overrides do not update the integration result labels.

Changelog

New

  • Add an integration-result workflow that checks the latest reported github-ui statuses and updates the passing or failing integration labels.

Changed

  • Exclude pending events and manual override events from the label job.
  • Fix the duplicate run key and unclosed step conditions in the workflow.
  • Add job-scoped statuses: read and pull-requests: write permissions.
  • Resolve one open PR whose head SHA matches the status event. Skip labeling when none match, and fail explicitly if multiple PRs match.
  • Recheck the PR's state, head SHA, and manual-skip label before updating labels.
  • Leave labels unchanged while matching statuses are pending without a failure.

Removed

None.

Rollout strategy

  • No changes needed in github/github-ui
  • Needs changes in github/github-ui
  • Ships with feature flag(s)
  • Not sure
  • None

This is an internal workflow change with no public API impact. No changeset is needed.

Testing & Reviewing

  • npx --no-install prettier --write .github/workflows/integration-result.yml: passed.
  • npx --no-install prettier --check .github/workflows/integration-result.yml: passed.
  • git diff --check: passed.
  • actionlint .github/workflows/integration-result.yml: passed.
  • Local YAML, shell syntax, and mocked CLI assertions: passed (pagination, single/no/multiple PR matches, status aggregation, label updates, skipped/stale/closed PRs, and CLI error propagation).
  • GitHub Actions execution was not run locally. Review the labeling steps with a real status event.
  • Build and component tests were not run for this workflow-only change.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 17:30
@joshblack
joshblack requested a review from a team as a code owner October 7, 2026 17:30
@joshblack
joshblack requested a review from jonrohan October 7, 2026 17:30
@changeset-bot

changeset-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: edf613f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the staff Author is a staff member label Oct 7, 2026
@joshblack joshblack added the skip changeset This change does not need a changelog label Oct 7, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8179c399-5285-4340-bdfc-d0d00ada417f

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Workflow validation errors and label-update failures prevent reliable operation.

7 open findings
What changed in this PR

Adds a status-driven alternative to comment-based integration labeling for Primer React pull requests.

Changes:

  • Listens for terminal github-ui status events.
  • Aggregates matching statuses to select passing or failing labels.
File Description
.github/​workflows/​integration-result.yml Adds status aggregation and integration-label update steps.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.


passing=$(jq '
[.[].statuses[] | select(.context | startswith("github-ui"))]
| length > 0 and all(.[]; .state == "success")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an explicit skipped/override check across the aggregated statuses and bypassed label updates when either description is present. Fixed in 8229210.

@github-actions
github-actions Bot temporarily deployed to storybook-preview-8516 October 7, 2026 17:38 Inactive
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 8179c399-5285-4340-bdfc-d0d00ada417f
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

@joshblack joshblack added the integration-tests: skipped manually Changes in this PR do not require an integration test label Nov 12, 2026
@github-actions
github-actions Bot requested a deployment to storybook-preview-8516 November 12, 2026 21:25 Abandoned
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8516 November 12, 2026 21:38 Inactive
@joshblack
joshblack enabled auto-merge November 12, 2026 21:59
@joshblack
joshblack disabled auto-merge November 12, 2026 21:59

@joshblack joshblack left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot remove the old way for applying labels to a PR in preference for this workflow

Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>

Copilot AI commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@copilot remove the old way for applying labels to a PR in preference for this workflow

Removed the comment-driven label updater; the status workflow remains the source of passing/failing results, while the separate recommendation workflow is unchanged. Fixed in edf613f.

This branch was successfully deployed

2 active deployments
storybook-preview-8516 — edf613f4 Deployed Nov 12, 2026 by github-actions[bot]
github-pages — edf613f4 Deployed Nov 12, 2026 by Copilot via deploy-preview #34253
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants