From 7eb2b0ee1386f7ec16f76bec5f10b45fbfdf72a1 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 23 Jun 2021 16:48:34 +0200 Subject: [PATCH 1/2] tools: avoid fetch extra commits when validating commit messages --- .github/workflows/commit-lint.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index 0f6fd639523cb0..42e9dc05283730 100644 --- a/.github/workflows/commit-lint.yml +++ b/.github/workflows/commit-lint.yml @@ -9,10 +9,12 @@ jobs: lint-commit-message: runs-on: ubuntu-latest steps: + - name: Compute number of commits in the PR + id: nb-of-commits + run: echo "::set-output name=nb::$((${{ github.event.pull_request.commits }} + 1))" - uses: actions/checkout@v2 with: - # Last 100 commits should be enough for a PR - fetch-depth: 100 + fetch-depth: ${{ steps.nb-of-commits.outputs.nb }} - name: Install Node.js uses: actions/setup-node@v2 with: From fc2dd1c042898b9f04bb415e2629d1f76c8f5ba8 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 4 Oct 2021 01:15:45 +0200 Subject: [PATCH 2/2] fixup! tools: avoid fetch extra commits when validating commit messages