From fa10dd061b1e027510e856cddafc9d27ebb7c51c Mon Sep 17 00:00:00 2001 From: Emanuela Epure <67077116+emanuelaepure10@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:15:57 +0100 Subject: [PATCH] chore!: update action conventional commits feat: update action conventional commits ING-3232 --- .../action-conventional-commits-taskmedia.yml | 29 +++++++++++++++++++ .../workflows/action-conventional-commits.yml | 2 +- .../workflows/gs-commit-message-checker.yml | 24 +++++---------- 3 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/action-conventional-commits-taskmedia.yml diff --git a/.github/workflows/action-conventional-commits-taskmedia.yml b/.github/workflows/action-conventional-commits-taskmedia.yml new file mode 100644 index 0000000..abd85b5 --- /dev/null +++ b/.github/workflows/action-conventional-commits-taskmedia.yml @@ -0,0 +1,29 @@ +name: Action Conventional Commits + +on: + push: + branches: + - main + +jobs: + build: + name: Conventional Commits + runs-on: ubuntu-latest + steps: + - uses: taskmedia/action-conventional-commits@v1.1.14 + with: + # token to access GitHub API to receive PR commits + # Default: ${{ github.token }} + token: "" + + # skip merge commits + # Default: true + skip_merge: "" + + # skip revert commits + # Default: true + skip_revert: "" + + # allow different types in commit message + # Default: fix|feat|revert + types: "" \ No newline at end of file diff --git a/.github/workflows/action-conventional-commits.yml b/.github/workflows/action-conventional-commits.yml index cc3ab9b..4e0a9c4 100644 --- a/.github/workflows/action-conventional-commits.yml +++ b/.github/workflows/action-conventional-commits.yml @@ -15,4 +15,4 @@ jobs: - 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 + allowed-commit-types: "feat,fix,docs,style,refactor,perf,test,chore" # Optional, set if you want a subset of commit types to be allowed. \ No newline at end of file diff --git a/.github/workflows/gs-commit-message-checker.yml b/.github/workflows/gs-commit-message-checker.yml index 6924583..2543a32 100644 --- a/.github/workflows/gs-commit-message-checker.yml +++ b/.github/workflows/gs-commit-message-checker.yml @@ -19,26 +19,16 @@ on: jobs: check-commit-message: - name: Check Commit Message + name: GS Commit Message Checker runs-on: ubuntu-latest steps: - - name: Check Commit Type - uses: gsactions/commit-message-checker@v1 - with: - pattern: '^.+(feat|fix|docs|style|refactor|perf|test|chore): .+$' - flags: 'gm' - error: 'Your first line has to contain a commit type like "feat: your_title".' - - name: Check Line Length + - name: Check for Resolves / Fixes uses: gsactions/commit-message-checker@v1 with: - pattern: '^[^#].{74}' - error: 'The maximum line length of 74 characters is exceeded.' - excludeDescription: 'true' # optional: this excludes the description body of a pull request - excludeTitle: 'true' # optional: this excludes the title of a pull request - checkAllCommitMessages: 'true' # optional: this checks all commits associated with a pull request - accessToken: ${{ secrets.GITHUB_TOKEN }} # github access token is only required if checkAllCommitMessages is true - - name: Check for Resolves / Fixes + pattern: '^.+(ING)\-[0-9]+$' + error: 'You need at least one "ING-" line.' + - name: Check Commit Type uses: gsactions/commit-message-checker@v1 with: - pattern: '^.+(feat|fix|docs|style|refactor|perf|test|chore): \#[0-9]+$' - error: 'You need at least one "feat|fix|docs|style|refactor|perf|test|chore: #" line.' \ No newline at end of file + pattern: '^.+(feat|fix|docs|style|refactor|perf|test|chore): .+$' + error: 'Your first line has to contain a commit type like "feat: your_title".' \ No newline at end of file