-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.28 KB
/
Copy pathpr-gate.yml
File metadata and controls
48 lines (41 loc) · 1.28 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: PR Quality Gate
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
branch-check:
name: Validate Branch Name
runs-on: ubuntu-latest
steps:
- name: Verify Branch Name
run: |
BRANCH_NAME="${{ github.head_ref }}"
if [[ ! "$BRANCH_NAME" =~ ^(feature|release|hotfix|chore)/ ]]; then
echo "Error: Branch name '$BRANCH_NAME' does not follow conventions (feature/, release/, hotfix/, chore/)."
exit 1
fi
verification:
name: Verified Run
runs-on: ubuntu-latest
needs: branch-check
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
run_install: true
- name: Typecheck Gate
run: pnpm run typecheck
- name: Repo Health Summary
run: |
echo "Repo Health Summary for PR #${{ github.event.pull_request.number }}"
echo "Source Branch: ${{ github.head_ref }}"
echo "Target Branch: ${{ github.base_ref }}"
echo "Node.js Version: $(node -v)"
echo "TypeScript Version: $(pnpm exec tsc -v)"