Skip to content

Commit

Permalink
tools: avoid fetch extra commits when validating commit messages
Browse files Browse the repository at this point in the history
PR-URL: #39128
Reviewed-By: Mary Marchini <oss@mmarchini.me>
  • Loading branch information
aduh95 committed Oct 30, 2021
1 parent f8035ec commit b5aa08d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/commit-lint.yml
Expand Up @@ -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:
Expand Down

0 comments on commit b5aa08d

Please sign in to comment.