Skip to content

Commit

Permalink
fix: Skip no-commit-to-branch hook in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier-radix committed Dec 11, 2023
1 parent eaec9e0 commit e08a439
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
{%- if not cookiecutter.private_package_repository_name %}
environment:
- POETRY_PYPI_TOKEN_PYPI
- CI
{%- else %}
secrets:
- poetry-auth
Expand Down
11 changes: 7 additions & 4 deletions {{ cookiecutter.__package_name_kebab_case }}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,13 @@ convention = "{{ cookiecutter.docstring_style|lower }}"
help = "Lint this package"

[[tool.poe.tasks.lint.sequence]]
cmd = """
pre-commit run
--all-files
--color always
shell = """
{%- if cookiecutter.development_environment == "strict" %}
if [ -n "$CI" ]; then
export SKIP=no-commit-to-branch
fi
{%- endif %}
pre-commit run --all-files --color always
"""
{%- if cookiecutter.development_environment == "strict" %}

Expand Down

0 comments on commit e08a439

Please sign in to comment.