From f82000192328668c14e50bccebacec11fe256ecd Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Fri, 16 Dec 2022 17:21:23 +0100 Subject: [PATCH] ci: use bonitasoft/actions pr-title-conventional-commits (#42) --- .github/workflows/commit-checks.yml | 15 ++++++++++++++ .github/workflows/contribution-checks.yml | 24 ++++++++--------------- 2 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/commit-checks.yml diff --git a/.github/workflows/commit-checks.yml b/.github/workflows/commit-checks.yml new file mode 100644 index 0000000..60f39ae --- /dev/null +++ b/.github/workflows/commit-checks.yml @@ -0,0 +1,15 @@ +name: Commit checks + +on: + pull_request_target: + # trigger when the PR title changes + types: [opened, edited, reopened] + +jobs: + pr-title: + runs-on: ubuntu-22.04 + permissions: + pull-requests: write # post comments when the PR title doesn't match the "Conventional Commits" rules + steps: + - name: Check Pull Request title + uses: bonitasoft/actions/packages/pr-title-conventional-commits@v2 diff --git a/.github/workflows/contribution-checks.yml b/.github/workflows/contribution-checks.yml index 7cc0ca8..0a62d4d 100644 --- a/.github/workflows/contribution-checks.yml +++ b/.github/workflows/contribution-checks.yml @@ -2,23 +2,15 @@ name: Contribution checks on: pull_request: - types: [opened, edited, synchronize] + types: [opened, reopened, synchronize] jobs: - commit-message-check: - runs-on: ubuntu-20.04 - steps: - - name: Check commit message - id: check-for-cc - uses: agenthunt/conventional-commit-checker-action@v1.0.0 - with: - pr-body-regex: '(.*\n*)+(.*)' pr-content-check: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - name: Check PR content - uses: bonitasoft/actions/packages/pr-diff-checker@v2.1.0 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - diffDoesNotContain: '["https://documentation.bonitasoft.com/", "Bonita BPM"]' - extensionsToCheck: '[".adoc"]' + - name: Check PR content + uses: bonitasoft/actions/packages/pr-diff-checker@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + diffDoesNotContain: '["https://documentation.bonitasoft.com/", "Bonita BPM"]' + extensionsToCheck: '[".adoc"]'