File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ usage() {
2121Usage: scripts/dev/submit-pr.sh --issue NUMBER --summary TEXT [options]
2222
2323Required:
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
2728Optional:
@@ -64,9 +65,13 @@ if [[ -z "$summary" ]]; then
6465 usage
6566fi
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
7176fi
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
You can’t perform that action at this time.
0 commit comments