Skip to content

Commit 37c2f50

Browse files
stinosdpgeorge
authored andcommitted
github/workflows: Add workflow to verify commit message format.
Using the new tools/verifygitlog.py script.
1 parent d48860c commit 37c2f50

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Check commit message formatting
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
with:
11+
fetch-depth: '100'
12+
- uses: actions/setup-python@v1
13+
- name: Check commit message formatting
14+
run: source tools/ci.sh && ci_commit_formatting_run

tools/ci.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ function ci_code_formatting_run {
2929
tools/codeformat.py -v
3030
}
3131

32+
########################################################################################
33+
# commit formatting
34+
35+
function ci_commit_formatting_run {
36+
git remote add upstream https://github.com/micropython/micropython.git
37+
git fetch --depth=100 upstream master
38+
# For a PR, upstream/master..HEAD ends with a merge commit into master, exlude that one.
39+
tools/verifygitlog.py -v upstream/master..HEAD --no-merges
40+
}
41+
3242
########################################################################################
3343
# code size
3444

0 commit comments

Comments
 (0)