diff options
-rw-r--r-- | .github/workflows/commit_formatting.yml | 14 | ||||
-rwxr-xr-x | tools/ci.sh | 10 |
2 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/commit_formatting.yml b/.github/workflows/commit_formatting.yml new file mode 100644 index 000000000..5f96fbb93 --- /dev/null +++ b/.github/workflows/commit_formatting.yml @@ -0,0 +1,14 @@ +name: Check commit message formatting + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: '100' + - uses: actions/setup-python@v1 + - name: Check commit message formatting + run: source tools/ci.sh && ci_commit_formatting_run diff --git a/tools/ci.sh b/tools/ci.sh index 4e4aad560..c6b641dae 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -30,6 +30,16 @@ function ci_code_formatting_run { } ######################################################################################## +# commit formatting + +function ci_commit_formatting_run { + git remote add upstream https://github.com/micropython/micropython.git + git fetch --depth=100 upstream master + # For a PR, upstream/master..HEAD ends with a merge commit into master, exlude that one. + tools/verifygitlog.py -v upstream/master..HEAD --no-merges +} + +######################################################################################## # code size function ci_code_size_setup { |