agrexgh
(Agrexgh)
1
I’m running builds with GitHub Actions.
When a build fails, I tried mentioning @cursor to have it fix the issue, but it doesn’t work.
What I want is for Cursor to detect the build failure, make the necessary fixes, and push the changes.
How can I achieve this?
deanrie
(Dean Rie)
2
Hey, thanks for the request. To automatically detect and fix build errors in GitHub Actions, use Cursor CLI in headless mode.
We have a ready cookbook example for automatically fixing CI errors: Fix CI Failures with Cursor CLI | Cursor Docs
This workflow:
- Automatically runs when a build fails
- Analyzes the error
- Applies fixes to the code
- Creates a separate branch with the fixes
- Leaves a comment on the PR with a link to create a PR with the fixes
To set it up, you’ll need to:
- Install Cursor CLI in GitHub Actions
- Add
CURSOR_API_KEY to your repo secrets
- Create a workflow file based on the docs example
More details on the GitHub Actions integration: GitHub Actions | Cursor Docs
agrexgh
(Agrexgh)
3
Thank you for your quick response!
I’ll try the steps you suggested.