Skip to content

Commit

Permalink
ci(PRE-COMMIT): update to cicd-tools 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Mar 20, 2024
1 parent 164efb1 commit a6f0474
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/job-50-test-precommit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ util() {
main() {

pushd "${TEST_PROJECT_NAME}" >> /dev/null
poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
poetry run pre-commit run --hook-stage manual spelling-vale-sync
scenario "${1}"
popd >> /dev/null

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow-cookiecutter-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
COMMAND: |
CICD_COMMIT_MESSAGES_FILE="$(mktemp XXXXXXXX.git_history_file)"
git log --pretty=format:%s "${PUSHED_COMMIT_REV_RANGE}" > "${CICD_COMMIT_MESSAGES_FILE}"
poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
poetry run pre-commit run --hook-stage manual spelling-vale-sync
poetry run pre-commit run --hook-stage commit-msg spelling-commit-message --commit-msg-filename "${CICD_COMMIT_MESSAGES_FILE}"
COMMAND_NAME: "Commit Message Spelling"
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.COOKIECUTTER_CONFIGURATION)._GITHUB_CI_DEFAULT_CONCURRENCY }}
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
uses: ./.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.COOKIECUTTER_CONFIGURATION)._GITHUB_CI_DEFAULT_CONCURRENCY }}
PRE_HOOK_COMMAND: poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
PRE_HOOK_COMMAND: poetry run pre-commit run --hook-stage manual spelling-vale-sync
PRECOMMIT_HOOK_ID: "spelling-markdown"
PRECOMMIT_HOOK_NAME: "Markdown Spelling"
PYTHON_VERSIONS: ${{ toJSON(fromJSON(needs.configuration.outputs.COOKIECUTTER_CONFIGURATION)._GITHUB_CI_DEFAULT_PYTHON_VERSIONS) }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-meta_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ jobs:
COMMAND: |
CICD_COMMIT_MESSAGES_FILE="$(mktemp XXXXXXXX.git_history_file)"
git log --pretty=format:%s "${PUSHED_COMMIT_REV_RANGE}" > "${CICD_COMMIT_MESSAGES_FILE}"
poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
poetry run pre-commit run --hook-stage manual spelling-vale-sync
poetry run pre-commit run --hook-stage commit-msg spelling-commit-message --commit-msg-filename "${CICD_COMMIT_MESSAGES_FILE}"
COMMAND_NAME: "Commit Message Spelling"
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.COOKIECUTTER_CONFIGURATION)._GITHUB_CI_DEFAULT_CONCURRENCY }}
Expand Down
13 changes: 4 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/cicd-tools-org/pre-commit.git
rev: 0.4.0
rev: 0.5.0
hooks:
- id: format-shell
args:
Expand All @@ -32,6 +32,7 @@ repos:
- "-ci"
- "-sr"
exclude: "^{{cookiecutter\\.project_slug}}/.+$|^\\.cicd-tools/boxes/.+$"
- id: git-conflict-markers
- id: format-toml
- id: lint-github-workflow
exclude: "^{{cookiecutter\\.project_slug}}/.+$"
Expand All @@ -53,7 +54,8 @@ repos:
- id: spelling-commit-message
- id: spelling-markdown
exclude: "^{{cookiecutter\\.project_slug}}/.+$"
- id: spelling-vale-synchronize
- id: spelling-vale-sync
- id: spelling-vale-vocab
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
hooks:
Expand All @@ -63,10 +65,3 @@ repos:
- "./{{cookiecutter.project_slug}}/.yamllint.yml"
exclude: "^{{cookiecutter\\.project_slug}}/.+$"
stages: [commit]
- repo: local
hooks:
- id: spelling-vale-vocab
name: "spelling-vale-vocab"
entry: /bin/bash -c 'for FILE in "$@"; do sort -u -o ${FILE} ${FILE}; done' --
files: "^.vale/Vocab/.+/(accept|reject)\\.txt$"
language: system
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ util() {
main() {

pushd "${TEST_PROJECT_NAME}" >> /dev/null
poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
poetry run pre-commit run --hook-stage manual spelling-vale-sync
scenario "${1}"
popd >> /dev/null

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
COMMAND: |
CICD_COMMIT_MESSAGES_FILE="$(mktemp XXXXXXXX.git_history_file)"
git log --pretty=format:%s "${PUSHED_COMMIT_REV_RANGE}" > "${CICD_COMMIT_MESSAGES_FILE}"
poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
poetry run pre-commit run --hook-stage manual spelling-vale-sync
poetry run pre-commit run --hook-stage commit-msg spelling-commit-message --commit-msg-filename "${CICD_COMMIT_MESSAGES_FILE}"
COMMAND_NAME: "Commit Message Spelling"
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
uses: cicd-tools-org/cicd-tools/.github/workflows/job-80-poetry-precommit_commit_stage_hook.yml@main
with:
CONCURRENCY: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_concurrency_limit }}
PRE_HOOK_COMMAND: poetry run pre-commit run --hook-stage manual spelling-vale-synchronize
PRE_HOOK_COMMAND: poetry run pre-commit run --hook-stage manual spelling-vale-sync
PRECOMMIT_HOOK_ID: "spelling-markdown"
PRECOMMIT_HOOK_NAME: "Markdown Spelling"
PYTHON_VERSIONS: ${{ toJSON(fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_python_versions) }}
Expand Down
13 changes: 4 additions & 9 deletions {{cookiecutter.project_slug}}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
- id: commitizen
stages: [commit-msg]
- repo: https://github.com/cicd-tools-org/pre-commit.git
rev: 0.4.0
rev: 0.5.0
hooks:
- id: format-shell
args:
Expand All @@ -30,6 +30,7 @@ repos:
{%- if cookiecutter.optional_toml_linting == 'true' %}
- id: format-toml
{%- endif %}
- id: git-conflict-markers
- id: lint-ansible
args:
- ansible_role
Expand All @@ -50,7 +51,8 @@ repos:
- id: security-credentials
- id: spelling-commit-message
- id: spelling-markdown
- id: spelling-vale-synchronize
- id: spelling-vale-sync
- id: spelling-vale-vocab
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
hooks:
Expand All @@ -59,10 +61,3 @@ repos:
- "-c"
- "./.yamllint.yml"
stages: [commit]
- repo: local
hooks:
- id: spelling-vale-vocab
name: "spelling-vale-vocab"
entry: /bin/bash -c 'for FILE in "$@"; do sort -u -o ${FILE} ${FILE}; done' --
files: "^.vale/Vocab/.+/(accept|reject)\\.txt$"
language: system

0 comments on commit a6f0474

Please sign in to comment.