ci(gitflow): enforce branch and PR governance checks
This commit is contained in:
17
.gitea/scripts/check-pr-todo-reference.sh
Executable file
17
.gitea/scripts/check-pr-todo-reference.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user