File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -220,8 +220,25 @@ main() {
220
220
# Extract 'Signed-off-by' lines from commits:
221
221
signed_off_bys=$( echo " $pr_commits " | jq -r ' .[].commit.message' | grep -Eio ' Signed-off-by:.*' | sort -u)
222
222
223
- # Extract linked issues from PR body (e.g., #123):
224
- issue_numbers=$( echo " $pr_body " | grep -oE ' #[0-9]+' | grep -oE ' [0-9]+' | sort | uniq)
223
+ # Extract linked issues from PR body:
224
+ issue_numbers=$(
225
+ echo " $pr_body " |
226
+ # Handle GitHub-supported issue references to stdlib-js/stdlib:
227
+ #
228
+ # - https://github.com/stdlib-js/stdlib/issues/123
229
+ # - stdlib-js/stdlib#123
230
+ # - #123 (**not** preceded by a word‑char, “/”, or “>”)
231
+ grep -oE ' https://github\.com/stdlib-js/stdlib/issues/[0-9]+|stdlib-js/stdlib#[0-9]+|(^|[^[:alnum:]_/>])#[0-9]+' |
232
+ # Strip the prefix so we’re left with the bare issue number:
233
+ sed -E '
234
+ s@https://github\.com/stdlib-js/stdlib/issues/([0-9]+)@\1@;
235
+ s@stdlib-js/stdlib#([0-9]+)@\1@;
236
+ s@(^|[^[:alnum:]_/>])#([0-9]+)@\2@
237
+ ' |
238
+ # Remove duplicates:
239
+ sort -u |
240
+ uniq
241
+ )
225
242
closes_issues=" "
226
243
ref_issues=" "
227
244
You can’t perform that action at this time.
0 commit comments