mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
Meta: Allow a couple of extra characters in long URLs in commit messages
This allows the number sign (for anchors) and semi-colons.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
323baf7a01
commit
3bdb79c870
Notes:
github-actions[bot]
2026-01-10 19:26:29 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/3bdb79c870f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7416 Reviewed-by: https://github.com/gmta ✅
2
.github/workflows/lint-commits.yml
vendored
2
.github/workflows/lint-commits.yml
vendored
@@ -49,7 +49,7 @@ jobs:
|
||||
error: "Commit title ends in a period",
|
||||
},
|
||||
{
|
||||
pattern: /^(.{0,72}|\s*[a-z]+:\/\/([a-z0-9\-]+\.)+[a-z]{2,}(:\d+)?(\/[a-zA-Z_0-9@:%+.~?&=\-]+)*)$/,
|
||||
pattern: /^(.{0,72}|\s*[a-z]+:\/\/([a-z0-9\-]+\.)+[a-z]{2,}(:\d+)?(\/[a-zA-Z_0-9@#:;%+.~?&=\-]+)*)$/,
|
||||
error: "Commit message lines are too long (maximum allowed is 72 characters, except for URLs on their own line)",
|
||||
},
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ while read -r line; do
|
||||
error "Commit title ends in a period"
|
||||
fi
|
||||
|
||||
url_pattern='^\s*[a-z]+:\/\/([a-z0-9\-]+\.)+[a-z]{2,}(:\d+)?(\/[a-zA-Z_0-9@:%+.~?&=\-]+)*$'
|
||||
url_pattern='^\s*[a-z]+:\/\/([a-z0-9\-]+\.)+[a-z]{2,}(:\d+)?(\/[a-zA-Z_0-9@#:;%+.~?&=\-]+)*$'
|
||||
if [[ $line_length -gt 72 ]] && (echo "$line" | grep -E -v -q "$url_pattern"); then
|
||||
error "Commit message lines are too long (maximum allowed is 72 characters, except for URLs on their own line)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user