Skip to content

Commit

Permalink
fixup! tools: add GitHub Action linter for pr-url
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Feb 4, 2021
1 parent 94460fa commit 30a80f1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ jobs:
lint-pr-url:
runs-on: ubuntu-latest
steps:
- name: Count the commits
id: commit-counter
run: echo "::set-output name=count::$((${{ github.event.pull_request.commits }} + 1))"
- uses: actions/checkout@v2
with:
fetch-depth: '${{ steps.commit-counter.outputs.count }}'
fetch-depth: 2
- run: git diff HEAD~${{ github.event.pull_request.commits }} HEAD -G"pr-url:" -- "*.md > temp.log && cat temp.log"
- run: git diff HEAD~${{ github.event.pull_request.commits }} HEAD -G"pr-url:" -- "*.md" | ./tools/lint-pr-url.mjs ${{ github.event.pull_request.html_url }}
- run: git diff HEAD^ HEAD -G"pr-url:" -- "*.md" | ./tools/lint-pr-url.mjs ${{ github.event.pull_request.html_url }}

0 comments on commit 30a80f1

Please sign in to comment.