fix: strip surrounding quotes from item_number in resolveIssueNumber#26114
fix: strip surrounding quotes from item_number in resolveIssueNumber#26114
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/ed40b4de-6a89-46c1-adbf-c399b9674524 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…ote test Agent-Logs-Url: https://github.com/github/gh-aw/sessions/ed40b4de-6a89-46c1-adbf-c399b9674524 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Fixes resolveIssueNumber failures when agent-provided item_number values are wrapped in extra matching quotes (single or double), by stripping those quotes before temporary-ID and numeric parsing.
Changes:
- Strip matching surrounding
'or"fromvalueStrinsideresolveIssueNumberbefore removing an optional leading#. - Add tests covering quoted temporary IDs, quoted numeric issue numbers, and mismatched-quote inputs (which should not be stripped).
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/temporary_id.cjs | Adds matching-quote stripping to make resolveIssueNumber resilient to "aw_..." / 'aw_...' inputs. |
| actions/setup/js/temporary_id.test.cjs | Adds regression tests for quoted inputs and a mismatched-quote non-strip case. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
🧪 Test Quality Sentinel ReportTest Quality Score: 68/100
Test Classification Details
Notes
|
The Copilot agent non-deterministically wraps string values in extra quotes (e.g.
"aw_blazwasm"instead ofaw_blazwasm), causingresolveIssueNumberto fail — theisTemporaryIdregex rejects the value andparseIntreturnsNaN.Changes
temporary_id.cjs— add quote-stripping immediately aftertrim()and before the existing#-prefix strip, using a backreference regex to ensure only matching quote pairs are removed:temporary_id.test.cjs— four new cases: double-quoted temp ID, single-quoted temp ID, double-quoted numeric issue number, mismatched quotes (should not be stripped).