Skip to content

Commit 43c51e1

Browse files
chrisburrTaykYoku
authored andcommitted
refactor: Add sweep, labeler and semantic CI configuration
1 parent 4e03dee commit 43c51e1

File tree

4 files changed

+66
-0
lines changed

4 files changed

+66
-0
lines changed

.github/labeler.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
alsoTargeting:rel-v4r3:
2+
- "*"
3+
- "**/*"

.github/workflows/labeler.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: "Pull Request Labeler"
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
triage:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/labeler@v3
10+
with:
11+
repo-token: "${{ secrets.PAT }}"

.github/workflows/pr-sweep.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: PR sweep
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
pr-sweep:
8+
runs-on: ubuntu-latest
9+
concurrency: pr-sweep
10+
if: github.repository == 'DIRACGrid/WebAppDIRAC'
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
token: ${{ secrets.PAT }}
16+
- uses: DIRACGrid/pr-sweeper@main
17+
with:
18+
github-pat: ${{ secrets.PAT }}
19+
pr-project-name: DiracGridBot/WebAppDIRAC

.github/workflows/semantic.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Check that the commit messages are between 20 and 150 chars,
2+
# and that they follow the rule
3+
# <type> (<scope>): <subject>
4+
# type: docs, feat, fix, refactor, style or test
5+
# scope (optional): any extra info, (like DMS or whatever)
6+
7+
name: "Commit Message Check"
8+
on: pull_request
9+
10+
jobs:
11+
check-commit-message:
12+
name: Check Commit Message
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check Commit Format
16+
uses: gsactions/commit-message-checker@v1
17+
with:
18+
pattern: '^(docs|feat|fix|refactor|style|test|sweep)( ?\(.*\))?: .+$'
19+
excludeDescription: "true" # optional: this excludes the description body of a pull request
20+
excludeTitle: "true" # optional: this excludes the title of a pull request
21+
checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request
22+
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true
23+
flags: "gim"
24+
error: 'Your commit has to follow the format "<type>(<scope>): <subject>"".'
25+
- name: Check Commit Length
26+
uses: gsactions/commit-message-checker@v1
27+
with:
28+
pattern: "^.{20,150}$"
29+
error: "Commit messages should be between 20 and 150 chars"
30+
excludeDescription: "true" # optional: this excludes the description body of a pull request
31+
excludeTitle: "true" # optional: this excludes the title of a pull request
32+
checkAllCommitMessages: "true" # optional: this checks all commits associated with a pull request
33+
accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true

0 commit comments

Comments
 (0)