Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 274179f

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 274179f

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

‎.github/workflows/pythonpackage.yml‎

Lines changed: 11 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+
with:
17+
fetch-depth: 0
1618
- name: Set up Python ${{ matrix.python-version }}
1719
uses: actions/setup-python@v1
1820
with:
@@ -27,6 +29,14 @@ jobs:
2729
git config --global user.email "action@github.com"
2830
git config --global user.name "GitHub Action"
2931
./scripts/test
32+
- name: Check commit
33+
run: |
34+
poetry run python -m commitizen check --rev-range ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} || \
35+
if [ $$? == 3 ] ; then
36+
exit 0;
37+
else
38+
exit 1;
39+
fi
3040
- name: Upload coverage to Codecov
3141
if: runner.os == 'Linux'
3242
uses: codecov/codecov-action@v1.0.3

‎scripts/test‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ ${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..

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /