Skip to content

Commit 7c5303b

Browse files
committed
ci(github-action): fix commit check error
* load the full commit log when checkout * do not raise error if no commit to check (e.g. master branch)
1 parent 2c9c8a3 commit 7c5303b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ jobs:
1212
python-version: [3.6, 3.7, 3.8]
1313

1414
steps:
15-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v2
16+
- run: |
17+
git fetch --prune --unshallow
1618
- name: Set up Python ${{ matrix.python-version }}
1719
uses: actions/setup-python@v1
1820
with:

scripts/test

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,10 @@ ${PREFIX}isort --recursive --check-only commitizen tests
1111
${PREFIX}flake8 commitizen/ tests/
1212
${PREFIX}mypy commitizen/ tests/
1313
${PREFIX}pydocstyle --convention=google --add-ignore=D1,D415
14-
${PREFIX}commitizen check --rev-range master..
14+
15+
${PREFIX}commitizen check --rev-range master..HEAD || \
16+
if [ $$? == 3 ] ; then
17+
exit 0;
18+
else
19+
exit 1;
20+
fi

0 commit comments

Comments
 (0)