From 6f4fc99609e7bba32e1afce8170eef488ad64e89 Mon Sep 17 00:00:00 2001 From: Pawel Karczewski Date: Wed, 25 May 2022 14:35:31 +0200 Subject: [PATCH 1/2] common: Allow long links in commit messages Allow lines which start with link to be longer than 72 characters like this one: https://looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.link --- utils/check-commit.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/check-commit.sh b/utils/check-commit.sh index 5c789998112..11ef544a96a 100755 --- a/utils/check-commit.sh +++ b/utils/check-commit.sh @@ -46,7 +46,8 @@ if [ "$prefix" = "" ]; then exit 1 fi -commit_len=$(git log --format="%s%n%b" -n 1 $1 | wc -L) +ignore_long_link_lines="!/^http/" +commit_len=$(git log --format="%s%n%b" -n 1 $1 | awk ${ignore_long_link_lines} | wc -L) if [ $commit_len -gt 73 ]; then echo "FAIL: commit message exceeds 72 chars per line (commit_len)" From 93f0cca13ed6fc8eab1e007d83d7db41fdedb1ab Mon Sep 17 00:00:00 2001 From: Pawel Karczewski Date: Wed, 25 May 2022 13:06:23 +0200 Subject: [PATCH 2/2] common: Do not run self-hosted jobs on forks Reference: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif https://github.com/prisma/prisma-examples#1988 --- .github/workflows/unittest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index 7e59f15cae6..594e80f646a 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -5,6 +5,7 @@ on: [push, pull_request] jobs: linux: name: PMDK_runners + if: github.repository == 'pmem/pmdk' runs-on: ${{ matrix.os }} strategy: matrix: