diff --git a/actions/issueflow-reconcile/issueflow-reconcile.sh b/actions/issueflow-reconcile/issueflow-reconcile.sh index faf6c8d..f6166a2 100644 --- a/actions/issueflow-reconcile/issueflow-reconcile.sh +++ b/actions/issueflow-reconcile/issueflow-reconcile.sh @@ -208,14 +208,12 @@ claim_reclaim_marker() { # $1 = last activity epoch refs_references() { # PR body on stdin -> local issue numbers named by Refs awk ' { - line = $0 - lower = tolower(line) - if (match(lower, /(^|[^[:alnum:]_-])refs[[:space:]:]+/)) { - line = substr(line, RSTART + RLENGTH) - if (line ~ /^(#|([[:alnum:]_.-]+\/)?[[:alnum:]_.-]+#)[0-9]+/) { - sub(/[.(;].*/, "", line) - print line - } + rest = tolower($0) + while (match(rest, /(^|[^[:alnum:]_-])refs[[:space:]:]+(#|([[:alnum:]_.-]+\/)?[[:alnum:]_.-]+#)[0-9]+/)) { + token = substr(rest, RSTART, RLENGTH) + sub(/^.*refs[[:space:]:]+/, "", token) + print token + rest = substr(rest, RSTART + RLENGTH) } } ' | issue_references \