keycloak/.github/scripts/pr-find-issues-test.sh
Akbar Husain 3f62bb4d2b
Make shebang in bash scripts consistent (#37369)
Closes #34983

Signed-off-by: akbarhusainpatel <apatel@intermiles.com>
2026-02-17 11:32:28 +01:00

26 lines
No EOL
540 B
Bash
Executable file

#!/usr/bin/env bash
set -e
# Use this script to test different variants of a PR body.
source ./pr-find-issues.sh
function testParsing() {
echo -n "$1 -> $2 "
if [ "$(parse_issues "$1")" != "$2" ]; then
echo "(failure)"
return 1
fi
echo "(success)"
return 0
}
function testFailed() {
echo "Test Failed!"
}
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"