forked from snowdreamtech/base
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.76 KB
/
Copy pathpr-title.yml
File metadata and controls
50 lines (44 loc) · 1.76 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
49
50
# Copyright (c) 2026 SnowdreamTech. All rights reserved.
# Licensed under the MIT License. See LICENSE file in the project root for full license information.
---
# PR Title Check
# Purpose: Verifies that pull request titles adhere to the Conventional Commits specification.
# Trigger: PR events (opened, edited, synchronize).
# Permissions:
# - pull-requests: read (Required to read the pull request metadata via the GitHub API).
# Concurrency:
# - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} (Scoped to PR/ref).
# - cancel-in-progress: true (Immediate feedback on updated PR titles).
# Design:
# - Uses 'pull_request' to ensure safety by preventing access to repository secrets from forks.
# - Near-instant global verification to maintain repository history purity.
name: "✅ PR Title Check"
"on":
pull_request:
types:
- opened
- edited
- synchronize
permissions: {}
env:
UNIRTM_LOCKED: 1
jobs:
commitlint:
name: "🔍 Semantic Title Validation"
runs-on: ubuntu-latest
concurrency:
group: pr-title-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
pull-requests: read # Required to read the pull request metadata via the GitHub API
statuses: write # Required to post status check results
timeout-minutes: 30 # Title linting is near-instant
steps:
- name: "🔍 Validate PR Title Integrity"
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Ensures PR titles follow Conventional Commits to maintain repository history purity.
requireScope: false
validateSingleCommit: true