Add dashboard elements #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Commit Message Linter | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
lint-commits: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository with full history | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 # Only fetch the latest commit | |
# Set up Node.js | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.x' | |
# Install dependencies | |
- name: Install dependencies | |
run: npm ci | |
working-directory: ./app | |
# Lint commit messages on the latest non-merge commit | |
- name: Run commitlint on the latest commit | |
run: | | |
git log --oneline --no-merges -1 --pretty=%B | npx commitlint | |
working-directory: ./app |