Code Issues Pull Requests Actions Packages Projects Releases 15 Wiki Activity Security Code Quality
2 Commits
2 changed files with 16 additions and 4 deletions

No files matched your search

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