File tree 2 files changed +37
-21
lines changed
2 files changed +37
-21
lines changed Original file line number Diff line number Diff line change 1
1
name : Check External Links
2
2
3
3
on :
4
+ pull_request :
5
+ branches :
6
+ - main
4
7
schedule :
5
8
- cron : " 59 23 * * 7" # Runs every Sunday at 23:59 UTC
6
- workflow_dispatch : # Allows manual trigger of the workflow
9
+ workflow_dispatch : # Allows manual triggering
7
10
8
11
jobs :
9
12
check-external-links :
Original file line number Diff line number Diff line change 1
- name : Check External Links
1
+ name : Validate PR Title
2
2
3
3
on :
4
4
pull_request :
5
- branches :
6
- - main
7
- schedule :
8
- - cron : " 59 23 * * 7" # Runs every Sunday at 23:59 UTC
9
- workflow_dispatch : # Allows manual triggering
5
+ types :
6
+ - opened
7
+ - edited
8
+ - synchronize
10
9
11
10
jobs :
12
- check-external-links :
13
- name : Check External Links
11
+ main :
12
+ name : Validate PR Title
14
13
runs-on : ubuntu-latest
15
- defaults :
16
- run :
17
- working-directory : ./
18
-
19
14
steps :
20
- - name : Checkout Repository
21
- uses : actions/checkout@v4
22
-
23
- - name : Install Dependencies
24
- run : npm ci
25
-
26
- - name : Run External Link Checks
27
- run : npm run linkcheck-external
15
+ - name : Validate PR Title with Conventional Commits
16
+ uses : amannn/action-semantic-pull-request@v5
17
+ env :
18
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19
+ with :
20
+ # Allowed types based on Conventional Commits
21
+ types : |
22
+ feat
23
+ fix
24
+ docs
25
+ chore
26
+ test
27
+ refactor
28
+ ci
29
+ # Scope is optional
30
+ requireScope : false
31
+ # This example ensures the subject doesn't start with an uppercase character.
32
+ subjectPattern : ^(?![A-Z]).+$
33
+ subjectPatternError : |
34
+ The subject "{subject}" found in the pull request title "{title}"
35
+ didn't match the configured pattern. Please ensure that the subject
36
+ doesn't start with an uppercase character.
37
+ # Allow Work-in-Progress (WIP) PRs using the "[WIP]" prefix
38
+ wip : true
39
+ # Skip validation for single-commit PRs
40
+ validateSingleCommit : false
You can’t perform that action at this time.
0 commit comments