Skip to content

Report Codespaces prebuild failures in GitHub issues#8191

Merged
joshblack merged 18 commits into
mainfrom
copilot/add-workflow-failure-issue
Jul 20, 2026
Merged

Report Codespaces prebuild failures in GitHub issues#8191
joshblack merged 18 commits into
mainfrom
copilot/add-workflow-failure-issue

Conversation

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Adds failure reporting for monitored workflows, initially Codespaces Prebuilds. Each failure creates an issue linking failed jobs and prompting @github/primer-engineering.

Changelog

New

  • Workflow monitor with an extensible workflow list.
  • Failure issues titled “Investigate GitHub workflow failure.”
  • Issue body listing the failed workflow and linked jobs.

Changed

  • None.

Removed

  • None.

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; CI-only change with no published package impact.

Testing & Reviewing

  • Review the workflow trigger, scoped permissions, and generated issue format.

Copilot AI and others added 2 commits July 17, 2026 18:31
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fefcc2f

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

Copilot AI changed the title Add workflow failure issue reporting Report Codespaces prebuild failures in GitHub issues Jul 17, 2026
Copilot AI requested a review from joshblack July 17, 2026 18:36

@joshblack joshblack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot let's just have it make a contextual workflow and the title should include the workflow name e.g. Investigate {workflow_name} workflow failure. It should not duplicate issues if one already exists, instead it should update the issue with the latest failure. It should also close any open failure issues for the workflows if they pass.

Copilot AI and others added 5 commits July 17, 2026 18:48
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot let's just have it make a contextual workflow and the title should include the workflow name e.g. Investigate {workflow_name} workflow failure. It should not duplicate issues if one already...

Implemented in 28cc6ee and finalized in 44672e3. Issues now use Investigate {workflow_name} workflow failure, update the existing workflow issue with the latest failure, and close open failure issues after a successful run.

Copilot AI requested a review from joshblack July 17, 2026 19:02

@joshblack joshblack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot split this into two steps:

  • create-or-update-issue if the workflow failed
  • close-issue if the workflow succeeded

apply appropriate logic to each

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

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot split this into two steps:

  • create-or-update-issue if the workflow failed...

Implemented in 3dd27f1. Failure runs now use create-or-update-issue, while successful runs use the independently gated close-issue job.

Copilot AI requested a review from joshblack July 17, 2026 19:15
@joshblack joshblack added skip changeset This change does not need a changelog integration-tests: skipped manually Changes in this PR do not require an integration test labels Jul 17, 2026
@joshblack
joshblack marked this pull request as ready for review July 17, 2026 19:17
Copilot AI review requested due to automatic review settings July 17, 2026 19:17
@joshblack
joshblack requested a review from a team as a code owner July 17, 2026 19:17

@joshblack joshblack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@copilot apply review suggestions. Also investigate if we can assign copilot automatically to the issue to try and fix it

Copilot AI and others added 4 commits July 17, 2026 19:36
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8191 July 17, 2026 19:48 Inactive
Copilot AI and others added 3 commits July 17, 2026 19:49
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>

Copilot AI commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot apply review suggestions. Also investigate if we can assign copilot automatically to the issue to try and fix it

Addressed in f8490ca. I applied the review feedback by narrowing issue lookup to matching failure issues, avoiding issue flapping when a newer run is still pending, and formatting failed-job links safely. I also investigated Copilot assignment and added a best-effort copilot assignment when creating/updating the issue; if Copilot assignment isn't enabled for the repository, the workflow logs a warning instead of failing.

Comment thread .github/workflows/report-workflow-failures.yml
Co-authored-by: Jon Rohan <yes@jonrohan.codes>
@joshblack
joshblack requested a review from jonrohan July 20, 2026 15:54
@github-actions
github-actions Bot requested a deployment to storybook-preview-8191 July 20, 2026 15:58 Abandoned
@github-actions
github-actions Bot temporarily deployed to storybook-preview-8191 July 20, 2026 16:09 Inactive
@joshblack
joshblack added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit dc32c89 Jul 20, 2026
54 checks passed
@joshblack
joshblack deleted the copilot/add-workflow-failure-issue branch July 20, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: skipped manually Changes in this PR do not require an integration test skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants