forked from agno-agi/agno
-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (25 loc) · 928 Bytes
/
pr-lint.yml
File metadata and controls
28 lines (25 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: PR Lint
on:
pull_request:
types:
- opened
- edited
- synchronize
jobs:
lint-pr:
name: Lint PR Title and Body
runs-on: ubuntu-latest
steps:
- name: Check PR Title Format
env:
TITLE: "${{ github.event.pull_request.title }}"
run: |
TITLE_LOWER=$(echo "$TITLE" | tr '[:upper:]' '[:lower:]')
REGEX='^(\[(feat|fix|cookbook|test|refactor|chore|style|revert|release)\][[:space:]]+.+|(feat|fix|cookbook|test|refactor|chore|style|revert|release):[[:space:]]+.+|(feat|fix|cookbook|test|refactor|chore|style|revert|release)-[a-z0-9-]+)$'
if [[ "$TITLE_LOWER" =~ $REGEX ]]; then
echo "✅ PR Title format is valid."
else
echo "❌ PR Title '$TITLE' does not match the required format."
echo " Use one of: [feat] title, feat: title, or feat-some-title"
exit 1
fi