| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - name: "Commit messages adheres to guidelines at https://goo.gl/p2fr5Q" | ||
| 1 | + name: "First commit message adheres to guidelines at https://goo.gl/p2fr5Q" | ||
| 2 | 2 | ||
| 3 | 3 | on: [pull_request] | |
| 4 | 4 | ||
@@ -9,17 +9,14 @@ jobs: | |||
| 9 | 9 | lint-commit-message: | |
| 10 | 10 | runs-on: ubuntu-latest | |
| 11 | 11 | 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))" | ||
| 15 | 12 | - uses: actions/checkout@v2 | |
| 16 | 13 | with: | |
| 17 | - fetch-depth: ${{ steps.nb-of-commits.outputs.nb }} | ||
| 14 | + fetch-depth: 2 | ||
| 18 | 15 | - name: Install Node.js | |
| 19 | 16 | uses: actions/setup-node@v2 | |
| 20 | 17 | with: | |
| 21 | 18 | node-version: ${{ env.NODE_VERSION }} | |
| 22 | - - name: Validate commit messages | ||
| 19 | + - name: Validate commit message | ||
| 23 | 20 | run: | | |
| 24 | 21 | echo "::add-matcher::.github/workflows/commit-lint-problem-matcher.json" | |
| 25 | - git log --oneline -${{ github.event.pull_request.commits }} HEAD^ | awk '{ if ($2 != "fixup!" && $2 != "squash!") { print $1 } }' | xargs npx -q core-validate-commit --no-validate-metadata --tap | ||
| 22 | + git rev-parse HEAD^ | xargs npx -q core-validate-commit --no-validate-metadata --tap | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments