From 34ec0fa8ad03de233c64578f7cb60ebdbf88e826 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Fri, 23 Jul 2021 15:43:15 +0300 Subject: [PATCH] CI: Skip commit linter line length check on lines that contain URLs --- .github/workflows/lintcommits.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lintcommits.yml b/.github/workflows/lintcommits.yml index 17585e3e8c5..3c9a9363bf7 100644 --- a/.github/workflows/lintcommits.yml +++ b/.github/workflows/lintcommits.yml @@ -26,8 +26,8 @@ jobs: uses: tim-actions/commit-message-checker-with-regex@v0.3.1 with: commits: ${{ steps.get-pr-commits.outputs.commits }} - pattern: '^.{0,72}(\n.{0,72})*$' - error: 'Commit message lines are too long (maximum allowed is 72 characters)' + pattern: '^.{0,72}(?:\n(?:(.{0,72})|(.*?([a-z]+:\/\/)?(([a-zA-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)' - name: Check subsystem if: ${{ success() || failure() }}