From 3bdb79c870f15eea8351eb8fdf1bf80bdeb8398f Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Sat, 10 Jan 2026 13:38:23 -0500 Subject: [PATCH] Meta: Allow a couple of extra characters in long URLs in commit messages This allows the number sign (for anchors) and semi-colons. --- .github/workflows/lint-commits.yml | 2 +- Meta/lint-commit.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-commits.yml b/.github/workflows/lint-commits.yml index d18be9bb2f4..5cb69b7baa5 100644 --- a/.github/workflows/lint-commits.yml +++ b/.github/workflows/lint-commits.yml @@ -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)", }, { diff --git a/Meta/lint-commit.sh b/Meta/lint-commit.sh index e801ae76d32..805417dd25f 100755 --- a/Meta/lint-commit.sh +++ b/Meta/lint-commit.sh @@ -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