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 <[email protected]>
  • Loading branch information
aduh95 authored and targos committed Nov 6, 2021
1 parent e9388c8 commit c700de3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
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 c700de3

Please sign in to comment.