Skip to content

Commit 41b8ed6

Browse files
wphillipmoorewphillipmoore-claude
andauthored
chore: sync shared tooling to v1.0.5 (#331)
Co-authored-by: wphillipmoore-claude <255925739+wphillipmoore-claude@users.noreply.github.com>
1 parent 9370129 commit 41b8ed6

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

scripts/dev/submit-pr.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ usage() {
2121
Usage: scripts/dev/submit-pr.sh --issue NUMBER --summary TEXT [options]
2222
2323
Required:
24-
--issue NUMBER GitHub issue number (just the number, no #)
24+
--issue REF Issue reference: a number (42) for same-repo, or
25+
a cross-repo ref (owner/repo#42)
2526
--summary TEXT One-line PR summary (goes under ## Summary)
2627
2728
Optional:
@@ -64,9 +65,13 @@ if [[ -z "$summary" ]]; then
6465
usage
6566
fi
6667

67-
# Validate issue is a positive integer.
68-
if [[ ! "$issue" =~ ^[1-9][0-9]*$ ]]; then
69-
echo "ERROR: --issue must be a positive integer, got '$issue'." >&2
68+
# Validate issue reference: plain number or owner/repo#number.
69+
if [[ "$issue" =~ ^[1-9][0-9]*$ ]]; then
70+
issue_ref="#${issue}"
71+
elif [[ "$issue" =~ ^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+#[1-9][0-9]*$ ]]; then
72+
issue_ref="${issue}"
73+
else
74+
echo "ERROR: --issue must be a number (42) or cross-repo ref (owner/repo#42), got '$issue'." >&2
7075
exit 1
7176
fi
7277

@@ -149,7 +154,7 @@ pr_body="# Pull Request
149154
150155
## Issue Linkage
151156
152-
- ${linkage} #${issue}
157+
- ${linkage} ${issue_ref}
153158
154159
## Testing
155160

0 commit comments

Comments
 (0)