Skip to content

Commit

Permalink
ci(github): add PR name lint job
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Jan 21, 2025
1 parent 06c0345 commit 12badb3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1,461 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
name: Lint Commit Messages
name: commitlint
on: [pull_request]

permissions:
contents: read
pull-requests: read

jobs:
commitlint:
commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v5

pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: npm install @commitlint/config-conventional
- uses: JulienKode/[email protected]
11 changes: 8 additions & 3 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { RuleConfigSeverity } from "@commitlint/types";
// Config used by 'commitlint' GitHub workflow

// Config used by 'commitlint' GitHub action.
export default {
const RuleConfigSeverity = {
Disabled: 0,
Warning: 1,
Error: 2,
}

module.exports = {
extends: ["@commitlint/config-conventional"],
// Rules: https://commitlint.js.org/reference/rules.html
rules: {
Expand Down
Loading

0 comments on commit 12badb3

Please sign in to comment.