Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/actions/validate-pr-title/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 'Validate PR Title'
description: 'Validates that PR titles follow conventional commit format with custom types'
inputs:
title:
description: 'PR title to validate'
required: true
outputs:
valid:
description: 'Whether the title is valid'
value: ${{ steps.validate.outputs.valid }}
runs:
using: 'composite'
steps:
- name: Validate PR title
id: validate
shell: bash
run: |
title="${{ inputs.title }}"

# Define allowed types
allowed_types="feat|fix|docs|style|refactor|perf|test|build|ci|chore|deps"

# Check if title matches conventional commit format
if echo "$title" | grep -qE "^($allowed_types)(\(.+\))?!?: .+"; then
echo "valid=true" >> $GITHUB_OUTPUT
echo "✅ PR title is valid: $title"
else
echo "valid=false" >> $GITHUB_OUTPUT
echo "❌ PR title is invalid: $title"
echo ""
echo "Expected format: <type>[optional scope]: <description>"
echo ""
echo "Allowed types: $allowed_types"
echo ""
echo "Examples:"
echo " feat: add new feature"
echo " fix: resolve bug"
echo " deps: update dependencies"
echo " chore: update CI configuration"
exit 1
fi
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ updates:
schedule:
interval: "weekly"
commit-message:
prefix: "build"
prefix: "deps"
include: "scope"
- package-ecosystem: "github-actions"
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/lint-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v5

- name: Validate PR title
uses: ./.github/actions/validate-pr-title
with:
title: ${{ github.event.pull_request.title }}
8 changes: 1 addition & 7 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,5 @@
"release-type": "node",
"package-name": "5e-database"
}
},
"changelog-sections": [
{
"type": "build",
"section": "Dependencies"
}
]
}
}
Loading