chore: add styles for components #137
Workflow file for this run
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: Lint PR | |
on: | |
pull_request: | |
types: ['opened', 'edited', 'reopened', 'synchronize'] | |
branches: | |
- staging | |
jobs: | |
commit-lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 20 ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# we need + 1 commit | |
fetch-depth: 2 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Lint pull request commit message when it has a single commit | |
if: ${{ github.event.pull_request.commits == '1' }} | |
run: | | |
echo "Since your PR has a single commit, this commit should adhere to the commit message convention." | |
echo "correct format: <type>(<scope>): <subject>" | |
echo "example: feat: add dialbot icon" | |
echo "Please amend your commit message (git commit --amend) if commitlint reports an error and push using: git push --force-with-lease" | |
git show -s --format=%B HEAD^2 | npx commitlint --verbose | |
- name: Lint pull request title | |
run: | | |
echo "The PR's title should adhere to the commit message convention." | |
echo "correct format: <type>(<scope>): <subject>" | |
echo "example: feat: add dialbot icon" | |
npx commitlint --verbose << EOF | |
${{ github.event.pull_request.title }} | |
EOF |