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 22, 2025
1 parent 3d13c22 commit 5547f15
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 1,462 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Lint Commit Messages
name: commitlint
on: [pull_request]

permissions:
contents: read
pull-requests: read

jobs:
commitlint:
commit-messages-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: check license headers
name: license-header
on:
push:
branches:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: pr-title
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
pr-title-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: npm install @commitlint/[email protected]
- 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' and 'pr-title' GitHub Actions

// 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 5547f15

Please sign in to comment.