Skip to content

Support more namings and subtitles #2

Support more namings and subtitles

Support more namings and subtitles #2

Workflow file for this run

---
name: Checks
on:
- pull_request
jobs:
check-commits:
name: Check Commits
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: npm install -g @commitlint/cli @commitlint/config-conventional conventional-changelog-conventionalcommits
- name: Get Base
id: get-base
run: |-
count=$(gh api "/repos/${{ github.repository }}/pulls/${{ github.event.number }}/commits" --jq "length")
req=$(($count + 1))
echo "count: $count, req: $req"
echo "commit-count=$count" >> $GITHUB_OUTPUT
echo "required=$req" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: ${{ steps.get-base.outputs.required }}
ref: ${{ github.event.pull_request.head.sha }}
- name: Check Commits
# yamllint disable-line rule:line-length
run: commitlint --from ${{ github.event.pull_request.head.sha }}~${{ steps.get-base.outputs.commit-count }} --to ${{ github.event.pull_request.head.sha }}
required:
runs-on: ubuntu-latest
name: Required Checks
steps:
- uses: bugale/bugroup-checks@v1
with:
checks: |-
GitHub Action.*
Check.*
.*[lL]int.*
self: Required Checks