File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-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 : Un-shallow the git history so we can poke around in it
8
+ run : git fetch --unshallow
9
+ shell : bash
10
+
11
+ - name : Check that every commit name includes an issue reference like "#1"
12
+ run : |
13
+ set -eo pipefail
14
+ IFS=$'\n'
15
+ commits=$(git log --oneline origin/${{github.base_ref}}..origin/${{github.head_ref}})
16
+ for commit in $commits
17
+ do
18
+ if [[ $commit =~ ^.*#[0-9]+.*$ ]];
19
+ then
20
+ continue
21
+ else
22
+ echo "Found commit with no issue number: $commit"
23
+ exit 1
24
+ fi
25
+ done
26
+ shell : bash
You can’t perform that action at this time.
0 commit comments