From 42a4f847f094de17a3a5f0c52e26f1dadccd5652 Mon Sep 17 00:00:00 2001 From: thephez Date: Thu, 3 Nov 2022 09:33:25 -0400 Subject: [PATCH 1/6] ci: add semantic pr check action (#6) --- .github/workflows/semantic-pull-request.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/semantic-pull-request.yml diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml new file mode 100644 index 0000000000000..889e2f232cfdc --- /dev/null +++ b/.github/workflows/semantic-pull-request.yml @@ -0,0 +1,17 @@ +name: "Lint PR" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From eee4a1564f9da0cb03c9ae42e4745761f404c3d4 Mon Sep 17 00:00:00 2001 From: thephez Date: Thu, 3 Nov 2022 09:50:18 -0400 Subject: [PATCH 2/6] ci: add types and scopes for pr title checks --- .github/workflows/semantic-pull-request.yml | 30 ++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index 889e2f232cfdc..96146cfadd442 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -14,4 +14,32 @@ jobs: steps: - uses: amannn/action-semantic-pull-request@v5 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # Configure which types are allowed (newline delimited). + # Default: https://github.com/commitizen/conventional-commit-types + types: | + feat + fix + docs + style + refactor + perf + test + build + ci + chore + revert + trivial + backport + # Configure which scopes are allowed (newline delimited). + scopes: | + consensus + qt + log + mining + net + rpc/rest/zmq + scripts + utils + wallet \ No newline at end of file From 342f7bff745546a007d4d7921fe230b5202a52ec Mon Sep 17 00:00:00 2001 From: thephez Date: Thu, 3 Nov 2022 12:54:58 -0400 Subject: [PATCH 3/6] ci: change action name --- .github/workflows/semantic-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index 96146cfadd442..3dd5b8670c00e 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -1,4 +1,4 @@ -name: "Lint PR" +name: "Check PR title format" on: pull_request_target: From af38c402135a829d75388e3e27742f29ff8fbf28 Mon Sep 17 00:00:00 2001 From: thephez Date: Thu, 3 Nov 2022 13:15:06 -0400 Subject: [PATCH 4/6] ci: add comment and link for our commit types/scopes --- .github/workflows/semantic-pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index 3dd5b8670c00e..09fe0618a9d68 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -17,7 +17,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: # Configure which types are allowed (newline delimited). - # Default: https://github.com/commitizen/conventional-commit-types + # Default: https://github.com/commitizen/conventional-commit-types + # Our specific types/scopes (from https://github.com/dashpay/dash/blob/master/CONTRIBUTING.md#contributor-workflow) types: | feat fix From e98b7fd38575c4d82527bc0acda2e193d0a5bcad Mon Sep 17 00:00:00 2001 From: thephez Date: Thu, 3 Nov 2022 13:24:54 -0400 Subject: [PATCH 5/6] ci: remove config for deprecated service --- .github/semantic.yml | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .github/semantic.yml diff --git a/.github/semantic.yml b/.github/semantic.yml deleted file mode 100644 index 3bf8e843570db..0000000000000 --- a/.github/semantic.yml +++ /dev/null @@ -1,29 +0,0 @@ -# https://github.com/zeke/semantic-pull-requests#configuration - -titleOnly: true - -scopes: - - consensus - - qt - - log - - mining - - net - - rpc/rest/zmq - - scripts - - utils - - wallet - -types: - - feat - - fix - - docs - - style - - refactor - - perf - - test - - build - - ci - - chore - - revert - - trivial - - backport From 9dd0649e744ff30495f29984adf0c63b20440564 Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 7 Nov 2022 07:18:44 -0500 Subject: [PATCH 6/6] Update .github/workflows/semantic-pull-request.yml Co-authored-by: UdjinM6 --- .github/workflows/semantic-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index 09fe0618a9d68..f89c97b6cf383 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -43,4 +43,4 @@ jobs: rpc/rest/zmq scripts utils - wallet \ No newline at end of file + wallet