fix(jira-integration): Harden Jira URL matching in “Closes …” lists - #89
Conversation
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe root Node.js version is pinned to v24.18.0, the integration-specific version pin is removed, and Jira resolved-issue extraction now escapes the Jira origin, adjusts “closes” matching, and handles URL matches case-insensitively. ChangesJira extraction and runtime
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Fixup-for: dba8129 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Reviewed-by: Claude Fable 5 <noreply@anthropic.com> Reviewed-by: Gemini gemini-2.5-pro <gemini-code-assist@google.com> Resolves: #89 (comment)
Support the Markdown autolink form (<URL>) in “Closes …” lists, for every item in the list including the first one. Brackets are optional on either side; issue keys are still extracted only via the strict key pattern, so nothing new can reach the JQL queries. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Reviewed-by: Claude Fable 5 <noreply@anthropic.com> Reviewed-by: CodeRabbit 0.6.5 <noreply@coderabbit.ai> Reviewed-by: CodeRabbit <136622811+coderabbitai[bot]@users.noreply.github.com> Reviewed-by: Codex gpt-5.5 <codex@openai.com> Reviewed-by: Gemini gemini-2.5-pro <gemini-code-assist@google.com>
The “Closes …” list is matched case-insensitively, but the per-match URL extraction was case-sensitive, so e.g. an uppercase host or a lowercase issue key made it return null and the action crashed on null.map(). Use the i flag in both extraction steps as well. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Reviewed-by: Claude Fable 5 <noreply@anthropic.com> Reviewed-by: CodeRabbit 0.6.5 <noreply@coderabbit.ai> Reviewed-by: CodeRabbit <136622811+coderabbitai[bot]@users.noreply.github.com> Reviewed-by: Codex gpt-5.5 <codex@openai.com> Reviewed-by: Gemini gemini-2.5-pro <gemini-code-assist@google.com>
Unescaped dots in the configured origin acted as wildcards, so look-alike hosts could match. RegExp.escape() is built in since Node 24, which this action already runs on. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Reviewed-by: Claude Fable 5 <noreply@anthropic.com> Reviewed-by: CodeRabbit 0.6.5 <noreply@coderabbit.ai> Reviewed-by: CodeRabbit <136622811+coderabbitai[bot]@users.noreply.github.com> Reviewed-by: Codex gpt-5.5 <codex@openai.com> Reviewed-by: Gemini gemini-2.5-pro <gemini-code-assist@google.com>
746279e to
5dd12e0
Compare
jira-integration now uses RegExp.escape, which needs Node 24. The action already runs on node24 (action.yaml), but the pinned .nvmrc kept local runs on Node 20, where the documented debugging flow (node index.mjs) would throw. One repo-root .nvmrc keeps all workspaces on the same version. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Reviewed-by: Codex gpt-5.5 <codex@openai.com> Reviewed-by: Gemini gemini-2.5-pro <gemini-code-assist@google.com>
5dd12e0 to
e4ff700
Compare
Why?
The jira-integration action’s “Closes …” URL matching had three gaps: Markdown autolink form (
<URL>) was not matched, case-variant Jira URLs crashed the action onnull.map(), and unescaped dots in the configured Jira origin acted as regexp wildcards, letting look-alike hosts match.What?
<URL>) Jira URLs in “Closes …” lists, for every item including the first; issue keys are still extracted only via the strict key pattern.iflag in the per-match URL extraction as well, so case-variant hosts or issue keys no longer make it returnnulland crash.RegExp.escape()(built in since Node 24, which this action already runs on) before embedding it in the URL regexp.