Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds a new PR Buildkite Detective reusable GitHub Actions workflow, lock file, example trigger, and documentation that gather Buildkite/MCP failure artifacts, run Copilot analysis, and post diagnostic PR comments with remediation suggestions. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Upstream as Upstream CI Workflow
participant GH as GitHub Actions (caller)
participant Reusable as PR Buildkite Detective (reusable WF)
participant Copilot as Copilot Agent
participant MCP as Buildkite / MCP API
participant PR as GitHub Pull Request
Upstream->>GH: workflow_run (failed, includes PR)
GH->>Reusable: call reusable workflow (inputs, secrets)
Reusable->>Copilot: start analysis job (setup, prompt, artifacts)
Copilot->>MCP: fetch pipeline runs & failure artifacts (BUILDKITE_API_TOKEN)
MCP-->>Copilot: return logs/artifacts
Copilot->>Copilot: analyze logs, determine root cause & fixes
Copilot->>PR: post diagnostic comment (COPILOT_GITHUB_TOKEN)
PR-->>GH: comment posted (results)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Verdict: APPROVE (non-blocking).
What is this? | From workflow: PR Review Agent
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. for issue #246
|
Fixed and pushed a follow-up commit to address the failed check in Root cause: workflow compilation rejected two unauthorized expressions in
Changes applied:
Validation run locally:
Commit pushed to this PR branch:
What is this? | From workflow: PR Checks Fixer Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
The CI failure is caused by disallowed expressions in the new workflow prompt file, not by Buildkite connectivity.
Evidence in this PR:
Recommended fix (minimal): - Otherwise call Buildkite MCP `list_pipelines` ... matching `$\{\{ github.event.repository.name }}`
+ Otherwise call Buildkite MCP `list_pipelines` ... matching `$\{\{ github.repository }}`
- If no SHA match is found, try branch `$\{\{ github.event.workflow_run.head_branch }}` ...
+ If no SHA match is found, select the latest failed build for the pipeline.Optional correctness cleanup in the same file: - `$\{\{ inputs.buildkite-org }}`
+ `$\{\{ inputs['buildkite-org'] }}`
- `inputs.buildkite-pipeline`
+ `inputs['buildkite-pipeline']`Commands run:
What is this? | From workflow: PR Checks Fixer Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
|
/ai can you address feedback? also see claude-workflows/build-failure-buildkite/rwx/action.yml i think we can detect the pipeline, etc which should make this a lot simpler |
|
Addressed the feedback and pushed a follow-up commit to What I changed
Validation
What is this? | From workflow: PR Assistant Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. for issue #246 |
|
Failed check root cause is confirmed: workflow compilation rejects two unauthorized expressions in
Recommended fix (minimal):
Validation run:
Follow-up:
What is this? | From workflow: PR Checks Fixer Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
- Replace github.event.repository.name with github.repository (agent extracts repo name from owner/name format) - Remove github.event.workflow_run.head_branch fallback; use SHA matching with latest-failed-build fallback instead - Remove workflow-edit-guardrails import (read-only workflow) - Recompile lock file Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
PR Buildkite Detectiveworkflow package undergh-agent-workflows/pr-buildkite-detective/with a README and trigger example..github/workflows/gh-aw-pr-buildkite-detective.mdto configure the Buildkite MCP integration (mcp.buildkite.com) and requiredBUILDKITE_API_TOKENsecret.docs/workflows/gh-agent-workflows.mdto list the new workflow and document the additional provider-specific secret requirement.Behavior
workflow_runevents associated with a pull request and callsgh-aw-pr-buildkite-detective.lock.yml@v0.Validation
make compilemake lint-workflowsmake lintRelated to #239
What is this? | From workflow: PR Body Update Agent
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
Summary by CodeRabbit
New Features
Documentation