diff --git a/.commit-check.yml b/.commit-check.yml index 45339d2..c624ad7 100644 --- a/.commit-check.yml +++ b/.commit-check.yml @@ -1,25 +1,25 @@ checks: - check: commit_message - regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)' + regex: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)|(Merge).*|(fixup!.*)' error: "The commit message should be structured as follows:\n\n [optional scope]: \n [optional body]\n [optional footer(s)]\n\n More details please refer to https://www.conventionalcommits.org" - suggest: 'git commit --amend' + suggest: git commit --amend --no-verify - check: branch_name - regex: '^(bugfix|feature|release|hotfix|task)\/.+|(master)|(main)|(HEAD)|(PR-.+)' - error: 'Branches must begin with these types: bugfix/ feature/ release/ hotfix/ task/' - suggest: 'git checkout -b type/branch_name' + regex: ^(bugfix|feature|release|hotfix|task)\/.+|(master)|(main)|(HEAD)|(PR-.+) + error: "Branches must begin with these types: bugfix/ feature/ release/ hotfix/ task/" + suggest: git checkout -b type/branch_name - check: author_name - regex: r'^([a-zA-Z]{2,}\s[a-zA-Z]{1,}'?-?[a-zA-Z]{2,}\s?([a-zA-Z]{1,})?)' - error: 'The user name seems invalid' - suggest: 'git config user.name "Peter Shen"' + regex: ^[a-z ,.\'-]+$|.*(\[bot]) + error: The committer name seems invalid + suggest: git config user.name "Peter Shen" - check: author_email - regex: '^\S+@\S+\.\S+$' - error: 'The email address seems invalid' - suggest: 'git config user.email xianpeng.shen@gmail.com' + regex: ^\S+@\S+\.\S+$ + error: The committer email seems invalid + suggest: git config user.email petershen@example.com diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 755e981..0a723ca 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,4 +12,4 @@ updates: - package-ecosystem: pip directory: / schedule: - interval: "weekly" + interval: "daily" diff --git a/README.md b/README.md index c6f9013..bb6e3b1 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/commit-check/commit-check-action) [![GitHub marketplace](https://img.shields.io/badge/Marketplace-commit--check--action-blue)](https://github.com/marketplace/actions/commit-check-action) -A Github Action for checking commit message formatting, branch naming, referencing Jira tickets, and more. +A Github Action for checking commit message formatting, branch naming, committer name, email, and more. ## Usage @@ -57,19 +57,30 @@ jobs: - **Description**: run checks without failing - Default: 'false' -Note: to change the default rules of above inputs, just add your own [`.commit-check.yml`](https://github.com/commit-check/commit-check#usage) config file. +Note: to change the default rules of above inputs, just add your own [`.commit-check.yml`](.commit-check.yml) config file. -## Add Commit Check Action badge in README +https://github.com/commit-check/commit-check#usage -You can show Commit Check Action status with a badge in your repository README +## Badging your repository -Example +You can add a badge to your repository to show your contributors / users that you use commit-check! + +[![Commit Check](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml) + +Markdown + +``` +[![Commit Check](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml) +``` + +reStructuredText ``` -[![commit-check](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml) +.. image:: https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg + :target: https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml + :alt: Commit Check ``` -[![commit-check](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml/badge.svg)](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml) ## Versioning diff --git a/requirements.txt b/requirements.txt index c9cbabd..a54aee2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ # Install commit-check CLI # For details please see: https://github.com/commit-check/commit-check -commit-check==0.2.4 +commit-check==0.4.0