From b3efc3cee7ce60b590045d05d8952648166d3fd8 Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Sun, 9 Jan 2022 20:57:28 +0800 Subject: [PATCH 01/12] test gitlint --- .github/workflows/gitlint.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/gitlint.yml diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml new file mode 100644 index 0000000..d5f8007 --- /dev/null +++ b/.github/workflows/gitlint.yml @@ -0,0 +1,18 @@ +name: Git Lint + +on: + [pull_request] + +jobs: + compliance_job: + runs-on: ubuntu-latest + name: Run compliance checks on patch series (PR) + steps: + - name: Run Compliance Tests + continue-on-error: true + id: compliance + env: + BASE_REF: ${{ github.base_ref }} + run: | + echo ${BASE_REF} + From cc2ca94fed7c4a15cfaebad06b95d892bfe63747 Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Sun, 9 Jan 2022 21:11:34 +0800 Subject: [PATCH 02/12] added gitlint --- .github/workflows/gitlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml index d5f8007..87f2138 100644 --- a/.github/workflows/gitlint.yml +++ b/.github/workflows/gitlint.yml @@ -14,5 +14,5 @@ jobs: env: BASE_REF: ${{ github.base_ref }} run: | - echo ${BASE_REF} + gitlint --commits origin/master.. From 643b9abb0320bd2f1885af63b6dc672f14bf7ece Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Sun, 9 Jan 2022 21:16:24 +0800 Subject: [PATCH 03/12] added installation for gitlint --- .github/workflows/gitlint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml index 87f2138..5800ad2 100644 --- a/.github/workflows/gitlint.yml +++ b/.github/workflows/gitlint.yml @@ -14,5 +14,6 @@ jobs: env: BASE_REF: ${{ github.base_ref }} run: | + pip3 install setuptools gitlint gitlint --commits origin/master.. From 2edcd64c3e32348a1e88a45543c61c1c269c60a3 Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Sun, 9 Jan 2022 21:24:24 +0800 Subject: [PATCH 04/12] added .gitlint --- .gitlint | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .gitlint diff --git a/.gitlint b/.gitlint new file mode 100644 index 0000000..e56e27e --- /dev/null +++ b/.gitlint @@ -0,0 +1,8 @@ +[title-max-length] +line-length=72 + +[body-max-line-length] +line-length=72 + +[general] +ignore=B6:body-is-missing \ No newline at end of file From 2cc1bd69d3fa6ba75103b0744eea0ec6cb3befb5 Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Sun, 9 Jan 2022 21:32:23 +0800 Subject: [PATCH 05/12] test functionality of gitlint --- .github/workflows/gitlint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml index 5800ad2..a02c6f2 100644 --- a/.github/workflows/gitlint.yml +++ b/.github/workflows/gitlint.yml @@ -15,5 +15,6 @@ jobs: BASE_REF: ${{ github.base_ref }} run: | pip3 install setuptools gitlint - gitlint --commits origin/master.. + gitlint --commits 2b95b9b46b78299ee0e2c38f57499aef02b65d13 +# gitlint --commits origin/master.. From 36826e74719f31fdb06510a78a5bd2f053a99731 Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Sun, 9 Jan 2022 21:45:02 +0800 Subject: [PATCH 06/12] added checkout of repo --- .github/workflows/gitlint.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml index a02c6f2..1e1315f 100644 --- a/.github/workflows/gitlint.yml +++ b/.github/workflows/gitlint.yml @@ -8,13 +8,14 @@ jobs: runs-on: ubuntu-latest name: Run compliance checks on patch series (PR) steps: - - name: Run Compliance Tests - continue-on-error: true - id: compliance - env: - BASE_REF: ${{ github.base_ref }} - run: | - pip3 install setuptools gitlint - gitlint --commits 2b95b9b46b78299ee0e2c38f57499aef02b65d13 + - uses: actions/checkout@v2 + - name: Run Compliance Tests + continue-on-error: true + id: compliance + env: + BASE_REF: ${{ github.base_ref }} + run: | + pip3 install setuptools gitlint + gitlint --commits 2b95b9b46b78299ee0e2c38f57499aef02b65d13 # gitlint --commits origin/master.. From 8fb5621d906ebbbf753d7a9102d2a03af438620c Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Mon, 10 Jan 2022 08:32:23 +0800 Subject: [PATCH 07/12] check only master --- .github/workflows/gitlint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml index 1e1315f..0e8fb28 100644 --- a/.github/workflows/gitlint.yml +++ b/.github/workflows/gitlint.yml @@ -16,6 +16,6 @@ jobs: BASE_REF: ${{ github.base_ref }} run: | pip3 install setuptools gitlint - gitlint --commits 2b95b9b46b78299ee0e2c38f57499aef02b65d13 -# gitlint --commits origin/master.. + gitlint --commits origin/master.. +# gitlint --commits 2b95b9b46b78299ee0e2c38f57499aef02b65d13 From cddc54fb94a1e5b2ec05f8e296df50076d4ad726 Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Mon, 10 Jan 2022 19:20:34 +0800 Subject: [PATCH 08/12] echo branch to check --- .github/workflows/gitlint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml index 0e8fb28..c472564 100644 --- a/.github/workflows/gitlint.yml +++ b/.github/workflows/gitlint.yml @@ -16,6 +16,7 @@ jobs: BASE_REF: ${{ github.base_ref }} run: | pip3 install setuptools gitlint + git branch -a gitlint --commits origin/master.. # gitlint --commits 2b95b9b46b78299ee0e2c38f57499aef02b65d13 From 336532ab26f8cb4590c1635eb869cd372b929d94 Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Mon, 10 Jan 2022 19:26:03 +0800 Subject: [PATCH 09/12] install more package --- .github/workflows/gitlint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml index c472564..cf3ccdc 100644 --- a/.github/workflows/gitlint.yml +++ b/.github/workflows/gitlint.yml @@ -15,8 +15,8 @@ jobs: env: BASE_REF: ${{ github.base_ref }} run: | - pip3 install setuptools gitlint - git branch -a + pip3 install setuptools gitlint pyflakes diff-cover + git fetch origin master:refs/remotes/origin/master gitlint --commits origin/master.. # gitlint --commits 2b95b9b46b78299ee0e2c38f57499aef02b65d13 From 557fba4edb336a21cd36ecfbd02adf1df79d613d Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Tue, 11 Jan 2022 22:21:54 +0800 Subject: [PATCH 10/12] update workflow --- .github/workflows/gitlint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gitlint.yml b/.github/workflows/gitlint.yml index cf3ccdc..a87ae5c 100644 --- a/.github/workflows/gitlint.yml +++ b/.github/workflows/gitlint.yml @@ -18,5 +18,6 @@ jobs: pip3 install setuptools gitlint pyflakes diff-cover git fetch origin master:refs/remotes/origin/master gitlint --commits origin/master.. +# gitlint --commits "origin/${BASE_REF}.." # gitlint --commits 2b95b9b46b78299ee0e2c38f57499aef02b65d13 From 9054d250f8655278fc9305de218e9d5e2bc75eb7 Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Tue, 11 Jan 2022 22:22:09 +0800 Subject: [PATCH 11/12] update .gitlint --- .gitlint | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitlint b/.gitlint index e56e27e..30fd125 100644 --- a/.gitlint +++ b/.gitlint @@ -4,5 +4,9 @@ line-length=72 [body-max-line-length] line-length=72 +[ignore-by-title] +regex=^Merge(.*)into(.*) + [general] -ignore=B6:body-is-missing \ No newline at end of file +ignore=body-is-missing,B6 +ignore-merge-commits=true \ No newline at end of file From 88b99a471699c6ff733d4125ec0b63db26f86607 Mon Sep 17 00:00:00 2001 From: Pin Loon Lee Date: Tue, 11 Jan 2022 22:23:17 +0800 Subject: [PATCH 12/12] update .gitlint --- .gitlint | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitlint b/.gitlint index 30fd125..d54c650 100644 --- a/.gitlint +++ b/.gitlint @@ -4,9 +4,6 @@ line-length=72 [body-max-line-length] line-length=72 -[ignore-by-title] -regex=^Merge(.*)into(.*) - [general] ignore=body-is-missing,B6 ignore-merge-commits=true \ No newline at end of file