Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6ebbd0d

Browse filesBrowse files
aduh95targos
authored andcommitted
tools: fix commit-lint GH Actions CI
PR-URL: #40845 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 6e9b665 commit 6ebbd0d
Copy full SHA for 6ebbd0d

File tree

Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-2
lines changed
Open diff view settings
Collapse file

‎.github/workflows/commit-lint.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/commit-lint.yml
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,20 @@ 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: |
15+
echo "::set-output name=plusOne::$((${{ github.event.pull_request.commits }} + 1))"
16+
echo "::set-output name=minusOne::$((${{ github.event.pull_request.commits }} - 1))"
1217
- uses: actions/checkout@v2
1318
with:
14-
fetch-depth: 2
19+
fetch-depth: ${{ steps.nb-of-commits.outputs.plusOne }}
20+
- run: git reset HEAD^2
1521
- name: Install Node.js
1622
uses: actions/setup-node@v2
1723
with:
1824
node-version: ${{ env.NODE_VERSION }}
1925
- name: Validate commit message
2026
run: |
2127
echo "::add-matcher::.github/workflows/commit-lint-problem-matcher.json"
22-
git rev-parse HEAD^ | xargs npx -q core-validate-commit --no-validate-metadata --tap
28+
git rev-parse HEAD~${{ steps.nb-of-commits.outputs.minusOne }} | xargs npx -q core-validate-commit --no-validate-metadata --tap

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.