mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-18 06:38:43 +01:00
[ticket/9824] Accept commit messages with less than perfect headings.
Some commit messages exist only temporarily, because they are given on commits that are intended to be squashed. Accept such commit messages with a warning. PHPBB3-9824
This commit is contained in:
parent
d7a38fd7ef
commit
e552287128
@ -118,7 +118,19 @@ do
|
|||||||
case $expect in
|
case $expect in
|
||||||
"header")
|
"header")
|
||||||
err=$ERR_HEADER;
|
err=$ERR_HEADER;
|
||||||
echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] [A-Z].+$"
|
echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] .+$"
|
||||||
|
result=$?
|
||||||
|
if ! echo "$line" | grep -Eq "^\[(ticket/[0-9]+|feature/$branch_regex|task/$branch_regex)\] [A-Z].+$"
|
||||||
|
then
|
||||||
|
# Don't be too strict.
|
||||||
|
# Commits may be temporary, intended to be squashed later.
|
||||||
|
# Just issue a warning here.
|
||||||
|
echo "Warning: heading should be a sentence beginning with a capital letter." 1>&2
|
||||||
|
echo "You entered:" 1>&2
|
||||||
|
echo "$line" 1>&2
|
||||||
|
fi
|
||||||
|
# restore exit code
|
||||||
|
(exit $result)
|
||||||
;;
|
;;
|
||||||
"empty")
|
"empty")
|
||||||
err=$ERR_EMPTY;
|
err=$ERR_EMPTY;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user