Skip to content

Commit 5d6c8da

Browse files
chore: align CI PR-title check & complete issue templates (#582) (#583)
1 parent a94f0fd commit 5d6c8da

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

.github/LABELS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ labels (e.g. `frontend`, `backend`, `connector: <name>`, `collector: <name>`,
8484
`agents`, `authentication`). They add routing context and an issue may carry
8585
more than one. They are not listed in `labels.yml`.
8686

87+
All label names are **lowercase**. Repository-specific labels use a neutral grey
88+
color (`ededed`); only the shared labels above carry color, so the common
89+
taxonomy stands out consistently across every Filigran repository.
90+
8791
## 5. Deprecated labels — do not use
8892

8993
- `enhancement` — use `feature`.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Validate PR Title
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, reopened, ready_for_review, synchronize]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
validate-pr-title:
12+
name: Validate Conventional PR title
13+
runs-on: ubuntu-latest
14+
if: github.event.pull_request.user.login != 'renovate[bot]' && !startsWith(github.event.pull_request.title, '[Snyk]')
15+
steps:
16+
- name: Check Conventional Commit title
17+
env:
18+
TITLE: ${{ github.event.pull_request.title }}
19+
run: |
20+
set -euo pipefail
21+
22+
echo "PR title: ${TITLE}"
23+
24+
# Filigran-wide Conventional Commits convention.
25+
ALLOWED_TYPES='feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert'
26+
27+
# Required format: type(scope?)!?: description (#123)
28+
PATTERN="^(${ALLOWED_TYPES})(\([a-z0-9]+([_-][a-z0-9]+)*(\/[a-z0-9]+([_-][a-z0-9]+)*)*\))?!?: [a-z0-9].* \(#[0-9]+\)$"
29+
30+
if [[ "${TITLE}" =~ ${PATTERN} ]]; then
31+
echo "PR title is valid."
32+
exit 0
33+
fi
34+
35+
echo "Invalid PR title."
36+
echo ""
37+
echo "Required format:"
38+
echo " type(scope?): description (#123)"
39+
echo ""
40+
echo "Allowed types:"
41+
echo " feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert"
42+
echo ""
43+
echo "Examples:"
44+
echo " feat(api): add bulk export endpoint (#871)"
45+
echo " fix: handle missing auth token (#456)"
46+
exit 1

0 commit comments

Comments
 (0)