2021-07-18 15:26:17 -07:00
|
|
|
name: "Commit Linter"
|
2021-10-08 17:08:47 -07:00
|
|
|
on:
|
2022-01-15 19:02:42 -07:00
|
|
|
# Only pull_request and push honor [skip ci]. Since this workflow must pass
|
|
|
|
# to merge a PR, it can't be skipped, so use pull_request_target
|
|
|
|
pull_request_target:
|
2021-10-08 17:08:47 -07:00
|
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
2021-07-18 15:26:17 -07:00
|
|
|
jobs:
|
|
|
|
lint-commits:
|
|
|
|
runs-on: ubuntu-latest
|
2021-10-08 17:08:47 -07:00
|
|
|
if: github.event.pull_request.draft == false
|
2021-07-18 15:26:17 -07:00
|
|
|
steps:
|
2022-05-20 20:45:10 -07:00
|
|
|
- uses: actions/checkout@v3
|
2021-07-18 15:26:17 -07:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-10-19 00:54:48 -07:00
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2022-02-06 06:08:35 -07:00
|
|
|
path: pr_nvim
|
2021-09-26 12:13:59 -07:00
|
|
|
- uses: rhysd/action-setup-vim@v1
|
|
|
|
with:
|
|
|
|
neovim: true
|
2022-02-06 06:08:35 -07:00
|
|
|
- run: wget https://raw.githubusercontent.com/neovim/neovim/master/scripts/lintcommit.lua
|
|
|
|
- run: nvim --clean -es +"cd pr_nvim" +"lua dofile('../lintcommit.lua').main({trace=true})"
|