Skip to content

Commit

Permalink
[ci]: Configure dependabot to follow commit message format (#4490)
Browse files Browse the repository at this point in the history
[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 <nurzhan.sakenov@gmail.com>
  • Loading branch information
nxsaken committed Apr 23, 2024
1 parent 61a78c4 commit f959384
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]"
22 changes: 19 additions & 3 deletions .github/workflows/iroha2-dev-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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+)*)?: .+$'
Expand All @@ -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+)*)?: .+$'
Expand All @@ -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

0 comments on commit f959384

Please sign in to comment.