Merged
Conversation
Adds a GitHub Actions workflow that automatically attempts to fix CI failures using cursor-agent. When the test workflow fails on a PR, this workflow analyzes the failure logs and proposes fixes via a compare link comment.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
Checkout checks out wrong branch in workflow_run context
High Severity
The actions/checkout step is missing a ref parameter. In a workflow_run context, checkout defaults to the repository's default branch (e.g., main), not the PR branch that caused the CI failure. The cursor-agent will analyze and attempt to fix code on the wrong branch. To check out the PR branch, a ref like ${{ github.event.workflow_run.head_sha }} is needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
CURSOR_API_KEYsecret to the repository settingsNote
Introduces automated CI remediation via
cursor-agentwhen theRun tests for the CLIworkflow fails on PRs..github/workflows/fix-ci.yamltriggers on failedworkflow_runevents and runs onubuntu-latestcursor-agent, configures git identity, sets up Go fromgo.mod, and usesgh run view <id> --log-failedfor diagnosticsci-fix/<pr-head-branch>, and posts a PR-ready compare link as a commentcontents/pull-requestswrite,actionsread; avoids creating PRs directly and prevents duplicate commentsWritten by Cursor Bugbot for commit 7f03716. This will update automatically on new commits. Configure here.