Skip to content

Commit 535d20b

Browse files
cliffhallclaude
andcommitted
fix(release): reject a hyphenated package scope as a --thank login
The login check backtracked to @my in @my-scope/pkg, so a value that credits nobody passed. Copilot round 1 on #5283. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
1 parent 1f9d9af commit 535d20b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎scripts/release-notes.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export function parseNotesArgs(argv) {
157157
for (const line of thanks) {
158158
// One bullet, naming whom it credits first, so the Contributors strip and
159159
// the discovery check both find them.
160-
if (!/^@[A-Za-z0-9-]+(?![\w/])[^\n]*$/.test(line)) {
160+
if (!/^@[A-Za-z0-9-]+(?![\w/-])[^\n]*$/.test(line)) {
161161
throw new Error(
162162
`--thank "${line}" is not one line starting with @login, as "@login (#ref), <what>"`,
163163
);

‎scripts/release-notes.test.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ test("parseNotesArgs takes advisories and hand credits, and validates both", ()
127127
"thanks @amy",
128128
"@amy (#1)\n* @eve, injected",
129129
"@scope/pkg, a package",
130+
"@my-scope/pkg, a hyphenated scope",
130131
]) {
131132
assert.throws(
132133
() => parseNotesArgs([...BASE, "--thank", line]),

0 commit comments

Comments
 (0)