mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Parse long issue reference variant from body
Closes #40365 Signed-off-by: Alexander Schwartz <aschwart@redhat.com>
This commit is contained in:
parent
9a8335c885
commit
e31064881b
3
.github/scripts/pr-find-issues-test.sh
vendored
3
.github/scripts/pr-find-issues-test.sh
vendored
@ -5,7 +5,7 @@ source ./pr-find-issues.sh
|
||||
|
||||
function testParsing() {
|
||||
echo -n "$1 -> $2 "
|
||||
if [ $(parse_issues "$1") != "$2" ]; then
|
||||
if [ "$(parse_issues "$1")" != "$2" ]; then
|
||||
echo "(failure)"
|
||||
return 1
|
||||
fi
|
||||
@ -22,3 +22,4 @@ trap 'testFailed' ERR
|
||||
testParsing "Closes #123" "123"
|
||||
testParsing "Fixes #123" "123"
|
||||
testParsing "Fixes: #123" "123"
|
||||
testParsing "Fixes https://github.com/keycloak/keycloak/issues/123" "123"
|
||||
6
.github/scripts/pr-find-issues.sh
vendored
6
.github/scripts/pr-find-issues.sh
vendored
@ -8,7 +8,11 @@ if [ "$REPO" == "" ]; then
|
||||
fi
|
||||
|
||||
function parse_issues() {
|
||||
echo "$1" | grep -i -P -o "(close|closes|closed|resolve|resolves|resolved|fixes|fixed):? #[[:digit:]]*" | cut -d '#' -f 2 | sort -n
|
||||
echo "$1" | \
|
||||
grep -i -P -o "(close|closes|closed|resolve|resolves|resolved|fixes|fixed):? (#|https://github.com/keycloak/keycloak/issues/)[[:digit:]]*" | \
|
||||
sed -e 's|https://github.com/keycloak/keycloak/issues/|#|g' | \
|
||||
sed -e 's|keycloak/keycloak/issues/|#|g' | \
|
||||
cut -d '#' -f 2 | sort -n
|
||||
}
|
||||
|
||||
if [ "$PR" != "" ]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user