File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Test this Action by running it against itself
2
+
3
+ on :
4
+ pull_request :
5
+
6
+ jobs :
7
+ run-itself :
8
+ runs-on : ubuntu-24.04
9
+ name : Check its own commit messages
10
+ steps :
11
+ - uses : actions/checkout@v4
12
+ - uses : ./
Original file line number Diff line number Diff line change
1
+ name : Commit message standards checks
2
+ description : Check the integrity of commit messages against Space ROS project standards
3
+
4
+ runs :
5
+ using : composite
6
+ steps :
7
+ - name : Checkout source
8
+ uses : actions/checkout@v4
9
+ with :
10
+ # Don't do a shallow clone since we need to poke around in the Git history
11
+ fetch-depth : 0
12
+
13
+ - name : Check that every commit name includes an issue reference like "#1"
14
+ run : |
15
+ set -eo pipefail
16
+ IFS=$'\n'
17
+ commits=$(git log --oneline origin/${{github.base_ref}}..origin/${{github.head_ref}})
18
+ for commit in $commits
19
+ do
20
+ if [[ $commit =~ ^.*#[0-9]+.*$ ]];
21
+ then
22
+ continue
23
+ else
24
+ echo "Found commit with no issue number: $commit"
25
+ exit 1
26
+ fi
27
+ done
28
+ shell : bash
You can’t perform that action at this time.
0 commit comments