From 1a385efb6807a7066950419132d80dbbc18056f3 Mon Sep 17 00:00:00 2001 From: Tushar Date: Mon, 1 Apr 2024 15:00:28 +0530 Subject: [PATCH 1/3] fix: commit workflow --- .github/workflows/commit_rules.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/commit_rules.yml b/.github/workflows/commit_rules.yml index 51b0cde..5ccdbcc 100644 --- a/.github/workflows/commit_rules.yml +++ b/.github/workflows/commit_rules.yml @@ -1,15 +1,17 @@ -rules: - - name: "Commit message length" - description: "Ensure commit messages are not too long" - pattern: ".{1,50}" - error_message: "Commit messages should be between 1 and 50 characters long" +name: Conventional Commits - - name: "Capitalized subject" - description: "Ensure commit message subject starts with a capital letter" - pattern: "^[A-Z].*" - error_message: "Commit message subject should start with a capital letter" +on: + pull_request: + branches: [ main ] - - name: "Imperative mood" - description: "Ensure commit message subject is in imperative mood" - pattern: "(^fix|^update|^add|^remove|^refactor|^implement|^merge|^resolve|^enhance|^correct|^optimize|^adjust|^improve|^change|^test|^doc|^style|^clean)(s|es|ed|ing)?\\b" - error_message: "Commit message subject should use imperative mood" +jobs: + build: + name: Conventional Commits + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: webiny/action-conventional-commits@v1.3.0 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Optional, for private repositories. + allowed-commit-types: "feat,fix" # Optional, set if you want a subset of commit types to be allowed. \ No newline at end of file From 685d5be2bc00c9ac618b3d87f2ebf46b3188c93a Mon Sep 17 00:00:00 2001 From: Tushar Date: Mon, 1 Apr 2024 15:00:52 +0530 Subject: [PATCH 2/3] chore : remove labeller --- .github/labeler.yml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .github/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index 4613569..0000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,22 +0,0 @@ -# This workflow will triage pull requests and apply a label based on the -# paths that are modified in the pull request. -# -# To use this workflow, you will need to set up a .github/labeler.yml -# file with configuration. For more information, see: -# https://github.com/actions/labeler - -name: Labeler -on: [pull_request_target] - -jobs: - label: - - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - - steps: - - uses: actions/labeler@v4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" From 29c9127276a7a9b6a6dac84f33d7e7083980eaea Mon Sep 17 00:00:00 2001 From: Tushar Date: Mon, 1 Apr 2024 15:01:37 +0530 Subject: [PATCH 3/3] fix: workflow test --- .github/workflows/dev_test.yml | 4 ++-- .github/workflows/docker_build.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev_test.yml b/.github/workflows/dev_test.yml index 9669c48..0ec11cd 100644 --- a/.github/workflows/dev_test.yml +++ b/.github/workflows/dev_test.yml @@ -3,10 +3,10 @@ name: Run Tests and Create .env.development on: push: branches: - - dev + - main pull_request: branches: - - dev + - main jobs: test: diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index 7e34d5b..c505576 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -3,7 +3,7 @@ name: Update docker dev image on: push: branches: - - dev + - main jobs: build-and-push: