18 lines
284 B
Bash
Executable File
18 lines
284 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
body="${1:-}"
|
|
|
|
if [ -z "$body" ]; then
|
|
echo "PR body is empty."
|
|
exit 1
|
|
fi
|
|
|
|
if printf "%s" "$body" | grep -Eq 'TODO|todo|\[P[1-3]\]'; then
|
|
echo "PR body includes TODO reference."
|
|
exit 0
|
|
fi
|
|
|
|
echo "PR body must reference the related TODO item."
|
|
exit 1
|