Skip to content

Commit c5da51c

Browse files
committed
fix(ci): workflow and revert changes
1 parent 2874354 commit c5da51c

File tree

2 files changed

+37
-21
lines changed

2 files changed

+37
-21
lines changed

.github/workflows/external-links.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: Check External Links
22

33
on:
4+
pull_request:
5+
branches:
6+
- main
47
schedule:
58
- 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
710

811
jobs:
912
check-external-links:
+33-20
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
1-
name: Check External Links
1+
name: Validate PR Title
22

33
on:
44
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
109

1110
jobs:
12-
check-external-links:
13-
name: Check External Links
11+
main:
12+
name: Validate PR Title
1413
runs-on: ubuntu-latest
15-
defaults:
16-
run:
17-
working-directory: ./
18-
1914
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

0 commit comments

Comments
 (0)