Skip to content

Commit

Permalink
Merge pull request #429 from uselagoon/dependabot/github_actions/wago…
Browse files Browse the repository at this point in the history
…id/commitlint-github-action-6.0.0

chore(deps): bump wagoid/commitlint-github-action from 5.4.5 to 6.0.0
  • Loading branch information
github-actions[bot] authored Apr 12, 2024
2 parents f23f835 + b698d43 commit 4e88f50
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 17 deletions.
15 changes: 0 additions & 15 deletions .github/commitlint.config.js

This file was deleted.

29 changes: 29 additions & 0 deletions .github/commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* Taken from: https://github.com/wagoid/commitlint-github-action/blob/7f0a61df502599e1f1f50880aaa7ec1e2c0592f2/commitlint.config.mjs */
/* eslint-disable import/no-extraneous-dependencies */
import { maxLineLength } from '@commitlint/ensure'

const bodyMaxLineLength = 100

const validateBodyMaxLengthIgnoringDeps = (parsedCommit) => {
const { type, scope, body } = parsedCommit
const isDepsCommit =
type === 'chore' && (scope === 'deps' || scope === 'deps-dev')

return [
isDepsCommit || !body || maxLineLength(body, bodyMaxLineLength),
`body's lines must not be longer than ${bodyMaxLineLength}`,
]
}

export default {
extends: ['@commitlint/config-conventional'],
plugins: ['commitlint-plugin-function-rules'],
rules: {
'body-max-line-length': [0],
'function-rules/body-max-line-length': [
2,
'always',
validateBodyMaxLengthIgnoringDeps,
],
},
}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@5ce82f5d814d4010519d15f0552aec4f17a1e1fe # v5.4.5
- uses: wagoid/commitlint-github-action@3c75220e8d20774b68eea48e869a706ff7249b54 # v6.0.0
with:
configFile: .github/commitlint.config.js
configFile: .github/commitlint.config.mjs
lint-actions:
permissions:
contents: read
Expand Down

0 comments on commit 4e88f50

Please sign in to comment.