Compare commits
No files matched your search
@@ -11,18 +11,21 @@ concurrency:
|
||||
env:
|
||||
BUN_VERSION: 1.4.5
|
||||
SKIP_AUTHORS: renovate renovatebot
|
||||
SKIP_PR_TITLES: Develop Master Main
|
||||
|
||||
jobs:
|
||||
lint-commits-and-pr:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Skip bot authors
|
||||
- name: Skip bots and reverse merges
|
||||
id: author
|
||||
env:
|
||||
AUTHOR: ${{ github.event.pull_request.user.login }}
|
||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
author=$(printf '%s' "$AUTHOR" | tr '[:upper:]' '[:lower:]')
|
||||
title=$(printf '%s' "$PR_TITLE" | tr '[:upper:]' '[:lower:]')
|
||||
skip=false
|
||||
for name in $SKIP_AUTHORS; do
|
||||
name=$(printf '%s' "$name" | tr '[:upper:]' '[:lower:]')
|
||||
@@ -31,9 +34,18 @@ jobs:
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ "$skip" == false ]]; then
|
||||
for name in $SKIP_PR_TITLES; do
|
||||
name=$(printf '%s' "$name" | tr '[:upper:]' '[:lower:]')
|
||||
if [[ "$title" == "$name" ]]; then
|
||||
skip=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [[ "$skip" == true || "$author" == *bot || "$author" == *'[bot]' ]]; then
|
||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||
echo "Skipping commitlint for ${AUTHOR}"
|
||||
echo "Skipping commitlint for ${AUTHOR}: ${PR_TITLE}"
|
||||
else
|
||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
@@ -10,8 +10,8 @@ module.exports = {
|
||||
// Require type and description (cannot be empty)
|
||||
'type-empty': [2, 'never'],
|
||||
'subject-empty': [2, 'never'],
|
||||
// Limit the length of the Title (header) to 72 characters
|
||||
'header-max-length': [2, 'always', 72],
|
||||
// Limit the length of the Title (header) to 128 characters
|
||||
'header-max-length': [2, 'always', 128],
|
||||
// Require a blank line between title and body/footer (following the Conventional Commits specification)
|
||||
'body-leading-blank': [2, 'always'],
|
||||
'footer-leading-blank': [2, 'always'],
|
||||
|
||||
Reference in new issue
Block a user