forked from heavy-duty/ceremony
fix: bind Refs declarations to one token (#234)
This commit is contained in:
parent
b2048f63bd
commit
b105939d95
1 changed files with 6 additions and 8 deletions
|
|
@ -208,14 +208,12 @@ claim_reclaim_marker() { # $1 = last activity epoch
|
||||||
refs_references() { # PR body on stdin -> local issue numbers named by Refs
|
refs_references() { # PR body on stdin -> local issue numbers named by Refs
|
||||||
awk '
|
awk '
|
||||||
{
|
{
|
||||||
line = $0
|
rest = tolower($0)
|
||||||
lower = tolower(line)
|
while (match(rest, /(^|[^[:alnum:]_-])refs[[:space:]:]+(#|([[:alnum:]_.-]+\/)?[[:alnum:]_.-]+#)[0-9]+/)) {
|
||||||
if (match(lower, /(^|[^[:alnum:]_-])refs[[:space:]:]+/)) {
|
token = substr(rest, RSTART, RLENGTH)
|
||||||
line = substr(line, RSTART + RLENGTH)
|
sub(/^.*refs[[:space:]:]+/, "", token)
|
||||||
if (line ~ /^(#|([[:alnum:]_.-]+\/)?[[:alnum:]_.-]+#)[0-9]+/) {
|
print token
|
||||||
sub(/[.(;].*/, "", line)
|
rest = substr(rest, RSTART + RLENGTH)
|
||||||
print line
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
' | issue_references \
|
' | issue_references \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue