Skip to content

Commit

Permalink
chore!: update action conventional commits
Browse files Browse the repository at this point in the history
feat: update action conventional commits
ING-3232
  • Loading branch information
emanuelaepure10 committed Mar 6, 2024
1 parent d7789f9 commit fa10dd0
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 18 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/action-conventional-commits-taskmedia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Action Conventional Commits

on:
push:
branches:
- main

jobs:
build:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: taskmedia/[email protected]
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: ""
2 changes: 1 addition & 1 deletion .github/workflows/action-conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- uses: webiny/[email protected]
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.
allowed-commit-types: "feat,fix,docs,style,refactor,perf,test,chore" # Optional, set if you want a subset of commit types to be allowed.
24 changes: 7 additions & 17 deletions .github/workflows/gs-commit-message-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-<issue number>" 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: #<issue number>" line.'
pattern: '^.+(feat|fix|docs|style|refactor|perf|test|chore): .+$'
error: 'Your first line has to contain a commit type like "feat: your_title".'

0 comments on commit fa10dd0

Please sign in to comment.