From f95938495636212e0d6b2bc924ee501f76d66dad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nurzhan=20Sak=C3=A9n?= Date: Tue, 23 Apr 2024 13:56:28 +0400 Subject: [PATCH] [ci]: Configure dependabot to follow commit message format (#4490) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ci]: Configure dependabot to follow commit message format [ci]: Recognize `chore` in PR titles [ci]: Fix chain of possible PR title checks Signed-off-by: Nurzhan Sakén --- .github/dependabot.yml | 12 +++++++++++- .github/workflows/iroha2-dev-pr-title.yml | 22 +++++++++++++++++++--- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 17b00185857..8a3aaa2166b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,27 +6,37 @@ updates: directory: "/" schedule: interval: "weekly" + commit-message: + prefix: "[chore]" - package-ecosystem: "github-actions" target-branch: "main" directory: "/" schedule: interval: "weekly" + commit-message: + prefix: "[chore]" - package-ecosystem: "pip" target-branch: "main" directory: "/client_cli/pytests/" schedule: interval: "daily" + commit-message: + prefix: "[chore]" - package-ecosystem: "cargo" target-branch: "main" directory: "/" schedule: interval: "daily" + commit-message: + prefix: "[chore]" - package-ecosystem: "cargo" target-branch: "main" - directory: "/default_validator/" + directory: "/default_executor/" schedule: interval: "daily" + commit-message: + prefix: "[chore]" diff --git a/.github/workflows/iroha2-dev-pr-title.yml b/.github/workflows/iroha2-dev-pr-title.yml index 04bb36f42c0..ef20366796d 100644 --- a/.github/workflows/iroha2-dev-pr-title.yml +++ b/.github/workflows/iroha2-dev-pr-title.yml @@ -59,7 +59,7 @@ jobs: - name: Documentation uses: actions-ecosystem/action-regex-match@v2 id: docs-match - if: steps.feature-match.outputs.match == '' + if: steps.fix-match.outputs.match == '' with: text: ${{ github.event.pull_request.title }} regex: '^\[documentation\]( #\d+(, #\d+)*)?: .+$' @@ -75,7 +75,7 @@ jobs: - name: CI uses: actions-ecosystem/action-regex-match@v2 id: ci-match - if: steps.feature-match.outputs.match == '' + if: steps.docs-match.outputs.match == '' with: text: ${{ github.event.pull_request.title }} regex: '^\[ci\]( #\d+(, #\d+)*)?: .+$' @@ -88,6 +88,22 @@ jobs: labels: | CI + - name: Chore + uses: actions-ecosystem/action-regex-match@v2 + id: chore-match + if: steps.ci-match.outputs.match == '' + with: + text: ${{ github.event.pull_request.title }} + regex: '^\[chore\]( #\d+(, #\d+)*)?: .+$' + - name: Add Chore label + uses: actions-ecosystem/action-add-labels@v1 + if: steps.chore-match.outputs.match != '' + continue-on-error: true + with: + github_token: ${{ secrets.github_token }} + labels: | + chore + - name: None of the above - if: steps.fix-match.outputs.match == '' && steps.refactor-match.outputs.match == '' && steps.feature-match.outputs.match == '' && steps.docs-match.outputs.match == '' && steps.ci-match.outputs.match == '' + if: steps.fix-match.outputs.match == '' && steps.refactor-match.outputs.match == '' && steps.feature-match.outputs.match == '' && steps.docs-match.outputs.match == '' && steps.ci-match.outputs.match == '' && steps.chore-match.outputs.match == '' run: exit 1