diff options
author | Antoine du Hamel <duhamelantoine1995@gmail.com> | 2021-10-30 18:45:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-30 18:45:25 +0300 |
commit | b5aa08d2f963bf0081d4b8538ee74a2265d492f2 (patch) | |
tree | 45b4179d7466c365449fe8b120bcd976d0b07c43 /.github | |
parent | f8035ecbbd9f32ec5ae398495cd645f00c4b0c51 (diff) |
tools: avoid fetch extra commits when validating commit messages
PR-URL: https://github.com/nodejs/node/pull/39128
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/commit-lint.yml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index 0f6fd639523..42e9dc05283 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: |