From 09c521cb3c910c8bb54e583ef1ba101e047f34f8 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Tue, 4 Jul 2023 09:30:37 +0200 Subject: [PATCH] chore: add antsibull-changelog lint pre-commit hook (#247) * chore: add antsibull-changelog lint pre-commit hook * ci: remove antsibull-changelog-lint workflow --- .../workflows/check-changelog-fragments.yml | 20 ------------------- .pre-commit-config.yaml | 11 ++++++++++ 2 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/check-changelog-fragments.yml diff --git a/.github/workflows/check-changelog-fragments.yml b/.github/workflows/check-changelog-fragments.yml deleted file mode 100644 index e848ede..0000000 --- a/.github/workflows/check-changelog-fragments.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: antsibull-changelog tests - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - name: antsibull-changelog-lint - steps: - - uses: actions/checkout@v2 - - name: Setup python - uses: actions/setup-python@v3 - with: - python-version: "3.10" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install antsibull-changelog - - name: test with lint - run: antsibull-changelog lint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b364082..8ba96d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,3 +41,14 @@ repos: rev: 23.3.0 hooks: - id: black + + - repo: local + hooks: + - id: antsibull-changelog-lint + name: antsibull-changelog lint + language: python + additional_dependencies: + - antsibull-changelog==0.21.0 + entry: antsibull-changelog lint + pass_filenames: false + files: ^changelogs/.*$