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 authored and BethGriggs committed Nov 25, 2021
1 parent 2c8a6ec commit b4a80db
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 b4a80db

Please sign in to comment.