Skip to content

Commit c700de3

Browse files
aduh95targos
authored andcommittedNov 6, 2021
tools: avoid fetch extra commits when validating commit messages
PR-URL: #39128 Reviewed-By: Mary Marchini <[email protected]>
1 parent e9388c8 commit c700de3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎.github/workflows/commit-lint.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ jobs:
99
lint-commit-message:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Compute number of commits in the PR
13+
id: nb-of-commits
14+
run: echo "::set-output name=nb::$((${{ github.event.pull_request.commits }} + 1))"
1215
- uses: actions/checkout@v2
1316
with:
14-
# Last 100 commits should be enough for a PR
15-
fetch-depth: 100
17+
fetch-depth: ${{ steps.nb-of-commits.outputs.nb }}
1618
- name: Install Node.js
1719
uses: actions/setup-node@v2
1820
with:

0 commit comments

Comments
 (0)