Skip to content

feat: auto-request Copilot fix when CI fails on Renovate PRs - #2168

Merged
pmcelhaney merged 6 commits into
mainfrom
copilot/ask-copilot-fix-ci-fail
Jun 22, 2026
Merged

feat: auto-request Copilot fix when CI fails on Renovate PRs#2168
pmcelhaney merged 6 commits into
mainfrom
copilot/ask-copilot-fix-ci-fail

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a workflow that detects CI failures on Renovate dependency-update PRs and automatically pings @copilot to investigate and propose a fix.

Original Prompt

When CI fails after Renovate updates a dependency, can the CI script automatically ask Copilot to fix it?

Manual acceptance tests

  • When CI fails on a renovate/* branch, a @copilot comment with the failed-run URL appears on the PR.
  • Re-running a failed CI on the same PR does not produce a duplicate comment.
  • A CI failure on a non-Renovate branch produces no comment.
  • A CI pass on a renovate/* branch produces no comment.
  • If no open PR exists for the failing Renovate branch, the workflow exits without error.

Tasks

  • Added .github/workflows/renovate-copilot-fix.yaml
    • Trigger: workflow_run on "CI Checks" completed — runs in base-repo context to get pull-requests: write even for Renovate's sandboxed PRs
    • Guard: conclusion == 'failure' and head_branch starts with renovate/
    • Duplicate prevention via invisible HTML marker <!-- renovate-copilot-fix-marker --> in posted comment body

Copilot AI requested review from Copilot and removed request for Copilot June 22, 2026 11:39
Copilot AI changed the title feat: ask Copilot to fix CI failures on Renovate PRs feat: auto-request Copilot fix when CI fails on Renovate PRs Jun 22, 2026
Copilot AI requested a review from pmcelhaney June 22, 2026 11:40
@pmcelhaney
pmcelhaney marked this pull request as ready for review June 22, 2026 14:06
Copilot AI review requested due to automatic review settings June 22, 2026 14:06

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.

Pull request overview

Adds automation to request an @copilot fix when CI fails on Renovate dependency-update PRs, so dependency bumps that break the build get faster turnaround without manual triage.

Changes:

  • Introduces a workflow_run-triggered workflow that detects failed “CI Checks” runs for renovate/* branches.
  • Locates the associated open PR and posts a single deduplicated @copilot comment with the failed-run URL.

Comment thread .github/workflows/renovate-copilot-fix.yaml Outdated
Comment thread .github/workflows/renovate-copilot-fix.yaml Outdated
Comment thread .github/workflows/renovate-copilot-fix.yaml
Comment thread .github/workflows/renovate-copilot-fix.yaml
@pmcelhaney
pmcelhaney added this pull request to the merge queue Jun 22, 2026
@pmcelhaney
pmcelhaney removed this pull request from the merge queue due to a manual request Jun 22, 2026
pmcelhaney and others added 3 commits June 22, 2026 10:12
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@pmcelhaney
pmcelhaney enabled auto-merge June 22, 2026 14:14
@pmcelhaney
pmcelhaney added this pull request to the merge queue Jun 22, 2026
Merged via the queue into main with commit 5797a27 Jun 22, 2026
8 of 9 checks passed
@pmcelhaney
pmcelhaney deleted the copilot/ask-copilot-fix-ci-fail branch June 22, 2026 14:23
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