Skip to content

Commit 38d7f35

Browse files
authored
ci: minor improvements (#16)
1 parent 59cdec5 commit 38d7f35

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# By default, add wallet backend team as reviewers
2+
* @status-im/wallet-backend

.github/workflows/commit-check.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Conventional Commits"
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
jobs:
10+
main:
11+
name: Validate format
12+
runs-on: ubuntu-latest
13+
permissions:
14+
pull-requests: write
15+
steps:
16+
- uses: amannn/[email protected]
17+
id: lint_pr_title
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
- uses: webiny/[email protected]
21+
id: lint_pr_commits
22+
- uses: marocchino/[email protected]
23+
# When the previous steps fails, the workflow would stop. By adding this
24+
# condition you can continue the execution with the populated error message.
25+
if: always() && (steps.lint_pr_title.outputs.error_message != null || steps.lint_pr_commits.outputs.error_message != null )
26+
with:
27+
header: pr-title-lint-error
28+
message: |
29+
Thank you for opening this pull request!
30+
31+
We require pull request titles and commits to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your PR needs to be adjusted.
32+
33+
Details:
34+
35+
> ${{ steps.lint_pr_title.outputs.error_message }}
36+
> ${{ steps.lint_pr_commits.outputs.error_message }}
37+
38+
# Delete a previous comment when the issue has been resolved
39+
- if: ${{ steps.lint_pr_title.outputs.error_message == null && steps.lint_pr_commits.outputs.error_message == null }}
40+
uses: marocchino/[email protected]
41+
with:
42+
header: pr-title-lint-error
43+
delete: true

0 commit comments

Comments
 (0)