| name | keppo:pr-fix:actions |
| description | Fix failing CI checks and GitHub Actions on a Pull Request. |
PR Fix: Actions
Fix failing CI checks and GitHub Actions on a Pull Request.
Arguments
$ARGUMENTS: Optional PR number or URL. If not provided, uses the current branch's PR.
Task Tracking
You MUST use the TaskCreate and TaskUpdate tools to track your progress. At the start, create tasks for each step below. Mark each task as in_progress when you start it and completed when you finish. This ensures you complete ALL steps.
Instructions
-
Determine the PR to work on:
- If
$ARGUMENTS contains a PR number or URL, use that
- Otherwise, get the current branch's PR using
gh pr view --json number,url,title,body --jq '.'
- If no PR is found, inform the user and stop
-
Check for failing CI checks:
gh pr checks <PR_NUMBER>
Identify which checks are failing:
- Lint/formatting checks
- Type checks
- Unit tests
- E2E/Playwright tests
- Build checks
- Security checks
-
For failing lint/formatting checks:
- Run
pnpm run lint to identify lint issues
- Run
pnpm run fmt to fix formatting
- Review the changes made
-
For failing type checks:
- Run
pnpm run typecheck to identify type errors
- Read the relevant files and fix the type issues
- Re-run type checks to verify fixes
-
For failing unit tests:
-
For failing Playwright/E2E tests:
- Check if the failures are snapshot-related by examining the CI logs or PR comments
- If the failures are not snapshot-related:
-
For failing build checks:
- Run the build locally:
pnpm run build
- Fix any build errors that appear
-
For failing security checks:
- Run the security check suite:
pnpm run check:security
- Fix any security violations, consulting
docs/rules/security.md for guidance
-
After making all fixes, verify:
- Run the full lint check:
pnpm run lint
- Run type checks:
pnpm run typecheck
- Run relevant unit tests:
pnpm run test:non-e2e
- Optionally run E2E tests locally if they were failing
-
Commit and push the changes:
If any changes were made:
git add -A
git commit -m "fix(ci): address failing CI checks
- <summary of fix 1>
- <summary of fix 2>
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
Then run /pr-push to push the changes.
-
Provide a summary to the user:
- List which checks were failing
- Describe what was fixed for each
- Note any checks that could not be fixed and require human attention