From bedf7b99c4196477cf80f8669cf237583d81649f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 17:17:23 -0700 Subject: [PATCH 1/5] chore(deps): bump commit-check from 0.2.4 to 0.3.1 (#2) Bumps [commit-check](https://github.com/commit-check/commit-check) from 0.2.4 to 0.3.1. - [Release notes](https://github.com/commit-check/commit-check/releases) - [Commits](https://github.com/commit-check/commit-check/compare/v0.2.4...v0.3.1) --- updated-dependencies: - dependency-name: commit-check dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c9cbabd..796723e 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.3.1 From 25c7d73292af9b73a0daee800a5df820fc25ffc1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 Jan 2023 04:49:19 +0000 Subject: [PATCH 2/5] chore(deps): bump commit-check from 0.3.1 to 0.3.3 (#3) --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 796723e..6e99565 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.3.1 +commit-check==0.3.3 From f62457d00fa668f0d32b2edc81f1fb303150fe2c Mon Sep 17 00:00:00 2001 From: Peter Shen Date: Wed, 1 Feb 2023 10:27:50 +0800 Subject: [PATCH 3/5] chore: update interval in dependabot.yml --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 402835d6492db01aae1df2289f9e5b4fabbbbf85 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 10:29:19 +0800 Subject: [PATCH 4/5] chore(deps): bump commit-check from 0.3.3 to 0.4.0 (#4) Bumps [commit-check](https://github.com/commit-check/commit-check) from 0.3.3 to 0.4.0. - [Release notes](https://github.com/commit-check/commit-check/releases) - [Commits](https://github.com/commit-check/commit-check/compare/v0.3.3...v0.4.0) --- updated-dependencies: - dependency-name: commit-check dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6e99565..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.3.3 +commit-check==0.4.0 From 0019571d804f6697a0deaa67f4cf0d375d1b325e Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Wed, 1 Feb 2023 10:47:56 +0800 Subject: [PATCH 5/5] docs: update README and .commit-check.yml --- .commit-check.yml | 22 +++++++++++----------- README.md | 25 ++++++++++++++++++------- 2 files changed, 29 insertions(+), 18 deletions(-) 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/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