fix(nexu-pal): skip triage for internal issue authors#599
Conversation
📝 WalkthroughWalkthroughThe pull request adds GitHub issue author association detection to the triage pipeline. A new environment variable Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/nexu-pal/lib/triage-opened-engine.mjs`:
- Around line 253-258: Add a unit test for buildOpenedIssueTriagePlan that
passes issueAuthorAssociation="MEMBER" (or "OWNER") to exercise the
internal-author short-circuit path; assert the function returns early (e.g.,
returns the diagnostics/plan indicating short-circuit) and that diagnostics
explicitly note that roadmap matching, duplicate detection, completeness
assessment, and triage labeling were skipped; also verify downstream helpers
(the roadmap matcher, duplicate detector, completeness assessor, and triage
labeler mocks) were not invoked. Ensure the test uses the same invocation
signature (issueTitle, issueBody, chat) and inspects the returned
diagnostics/messages to confirm the short-circuit explanation is present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 190b6eb4-f69a-459f-acf3-79899a9b898d
📒 Files selected for processing (4)
.github/workflows/nexu-pal-issue-opened.ymlscripts/nexu-pal/lib/triage-opened-engine.mjsscripts/nexu-pal/process-issue-opened.mjsspecs/current/nexu-pal.md
|
/cr 组织内成员创建的 issue 跳过分拣流程 |
|
✅ CR topic created in Feishu topic group Refly CR. |
What
Skip the opened-issue triage flow for issues created by internal organization members after translation and bug classification.
Why
Internal team issues should still get AI translation and automatic bug labeling, but they should not be routed through the external intake flow that adds
needs-information, known-issue checks, orneeds-triage.How
issue.author_associationfrom the issue-opened workflow into the triage scriptMEMBERandOWNERas internal authors in the triage engineAffected areas
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpassespnpm generate-typesrun (if API routes/schemas changed)anytypes introduced (useunknownwith narrowing)Notes for reviewers
pnpm lintandpnpm testdo not pass in the current local environment because workspace dependencies/tooling are not installed (node_modulesmissing,vitestnot found, and TypeScript tooling is not ready). Syntax checks for the touched nexu-pal scripts passed.Summary by CodeRabbit