From 0a18c855fd43110671ad1faa2335e102b4bb8a72 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 7 Feb 2023 21:55:31 +0200 Subject: [PATCH 1/2] tools: Revalidate commits when PR is updated Trigger GH action also if labeled, unlabeled. Signed-off-by: Donatas Abraitis --- .github/workflows/commitlint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index a91c6174aa..8ed60aee3b 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -5,6 +5,9 @@ on: types: - opened - reopened + - synchronize + - labeled + - unlabeled jobs: lint: From 8428482abb16921c33d2f1c530041ce86dc3404d Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 7 Feb 2023 22:03:42 +0200 Subject: [PATCH 2/2] tools: Fetch more commits for commitlint to validate the commit Note: It's necessary that you specify the fetch-depth argument to actions/checkout@v2 step. By default they fetch only latest commit of the branch, but we need more commits since we validate a range of commit messages. Signed-off-by: Donatas Abraitis --- .github/workflows/commitlint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 8ed60aee3b..e9c66a9036 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -18,6 +18,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Check Commit uses: wagoid/commitlint-github-action@v5