Files
Netcatty/.github/cursor
陈大猫 27a42e3a76 fix(ci): Cursor triage crash + already_available how-to close (#2439)
* fix(ci): stop Cursor issue triage crashing on Search pagination

Octokit normalizes Search API pages so response.data is already the items
array. Mapping response.data.items returned undefined and then crashed on
candidate.user during daily-limit admission — so every valid new issue
failed before Cursor classify could run.

* fix(ci): classify already-available issues with how-to and auto-close

Add an already_available triage category for requests the product already
ships: after code-grounded inspection, reply with the concrete UI entry
path, then close as completed. Low confidence falls back to other instead
of closing. Keeps the Search pagination fix so new issues can classify.
2026-07-24 14:01:11 +08:00
..

Cursor CLI automation

GitHub Actions orchestration that uses Cursor CLI for issue triage and implementation of high-confidence bugs / small features. Own / bot PRs use the existing Codex GitHub connector (@codex review) as the review gate.

Third-party / fork PRs are not reviewed by Cursor CLI. Their initial Codex review is assumed to be auto-configured on the repo; this workflow only re-comments @codex review after the author pushes more commits (pull_request synchronize).

Required secret

Secret Purpose
CURSOR_API_KEY Cursor CLI authentication (issue classify/implement + own PR fix loop)

Optional:

  • TRIAGE_GITHUB_TOKEN — optional PAT for PR comments / fork re-@codex.
  • SLACK_WEBHOOK_URL — status pings.

Fork re-@codex uses pull_request_target (default-branch checkout only) so GITHUB_TOKEN can write comments. Write tokens are step-scoped only (never workflow-wide). Agent steps run without git credentials; publish uses a fresh clone.

Variables

Variable Default Purpose
CURSOR_CODEX_FIX_MAX_ROUNDS 40 Max Cursor fix ↔ @codex review loops on own/bot PRs
CURSOR_TRIAGE_DAILY_LIMIT 10 Daily auto triage for non-collaborators
AUTOMATION_OWN_ACTORS binaricat Logins treated as first-party PR authors

Manual retry

Actions → Cursor automation → Run workflow → provide an issue or PR number.

Safety

  • External / fork PRs: only re-trigger Codex; no Cursor CLI review and no commits.
  • Own / bot PR Codex findings: Cursor CLI may push fixes (max rounds).
  • Automation never publishes changes under .github/ or automation scripts.
  • Issue text is sanitized before prompts.