diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 4f08a45..37cffb1 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -1 +1 @@
-* @shenxianpeng
+* @commit-check/developers
diff --git a/.github/workflows/commit-check.yml b/.github/workflows/commit-check.yml
index dc398fd..f75de56 100644
--- a/.github/workflows/commit-check.yml
+++ b/.github/workflows/commit-check.yml
@@ -26,5 +26,6 @@ jobs:
author-email: true
commit-signoff: true
merge-base: true
+ imperative: true
job-summary: true
pr-comments: ${{ github.event_name == 'pull_request' }}
diff --git a/README.md b/README.md
index 864c2a9..478a8d4 100644
--- a/README.md
+++ b/README.md
@@ -3,11 +3,11 @@
[](https://github.com/commit-check/commit-check-action/actions/workflows/main.yaml)
[](https://github.com/commit-check/commit-check-action/actions/workflows/commit-check.yml)

-[](https://github.com/commit-check/commit-check-action/network/dependents)
+[](https://github.com/commit-check/commit-check-action/network/dependents)
[](https://github.com/marketplace/actions/commit-check-action)
[](https://github.com/commit-check/commit-check-action/blob/a2873ca0482dd505c93fb51861c953e82fd0a186/action.yml#L59-L69)
-A Github Action for checking commit message formatting, branch naming, committer name, email, commit signoff and more.
+A GitHub Action for checking commit message formatting, branch naming, committer name, email, commit signoff, and more.
## Table of Contents
@@ -33,7 +33,7 @@ on:
jobs:
commit-check:
runs-on: ubuntu-latest
- permissions: # use permissions because of use pr-comments
+ permissions: # use permissions because use of pr-comments
contents: read
pull-requests: write
steps:
@@ -43,7 +43,7 @@ jobs:
fetch-depth: 0 # required for merge-base check
- uses: commit-check/commit-check-action@v1
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because of use pr-comments
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # use GITHUB_TOKEN because use of pr-comments
with:
message: true
branch: true
@@ -51,6 +51,7 @@ jobs:
author-email: true
commit-signoff: true
merge-base: false
+ imperative: false
job-summary: true
pr-comments: ${{ github.event_name == 'pull_request' }}
```
@@ -70,6 +71,8 @@ jobs:
Extrawest
Chainlift
+
+ Mila
and many more.
@@ -78,13 +81,13 @@ jobs:
### `message`
- **Description**: check commit message formatting convention.
- - By default the rule follows [conventional commits](https://www.conventionalcommits.org/).
+ - By default, the rule follows [conventional commits](https://www.conventionalcommits.org/).
- Default: `true`
### `branch`
- **Description**: check git branch naming convention.
- - By default the rule follows [conventional branch](https://conventional-branch.github.io/).
+ - By default, the rule follows [conventional branch](https://conventional-branch.github.io/).
- Default: `true`
### `author-name`
@@ -104,17 +107,22 @@ jobs:
### `merge-base`
-- **Description**: check current branch is rebased onto target branch.
+- **Description**: check current branch is rebased onto the target branch.
- Default: `false`
> [!IMPORTANT]
-> `merge-base` is an experimental feature. by default it's disable.
+> `merge-base` is an experimental feature. By default, it's disabled.
>
-> To use this feature, you need fetch all history for all branches by setting `fetch-depth: 0` in `actions/checkout`.
+> To use this feature, you need to fetch all history for all branches by setting `fetch-depth: 0` in `actions/checkout`.
+
+### `imperative`
+
+- **Description**: check commit message is imperative mood.
+- Default: `false`
### `dry-run`
-- **Description**: run checks without failing. exit code is 0 otherwise is 1.
+- **Description**: run checks without failing. exit code is 0; otherwise is 1.
- Default: `false`
### `job-summary`
@@ -128,11 +136,11 @@ jobs:
- Default: `false`
> [!IMPORTANT]
-> `pr-comments` is an experimental feature. by default it's disable. To use it you need to set `GITHUB_TOKEN` in the GitHub Action.
+> `pr-comments` is an experimental feature. By default, it's disabled. To use it, you need to set `GITHUB_TOKEN` in the GitHub Action.
>
> This feature currently doesn’t work with forked repositories. For more details, refer to issue [#77](https://github.com/commit-check/commit-check-action/issues/77).
-Note: the default rule of above inputs is following [this configuration](https://github.com/commit-check/commit-check/blob/main/.commit-check.yml), if you want to customize just add your `.commit-check.yml` config file under your repository root directory.
+Note: the default rule of above inputs is following [this configuration](https://github.com/commit-check/commit-check/blob/main/.commit-check.yml). If you want to customize, just add your `.commit-check.yml` config file under your repository root directory.
## GitHub Action Job Summary
@@ -183,4 +191,4 @@ Versioning follows [Semantic Versioning](https://semver.org/).
## Have questions or feedback?
-To provide feedback (requesting a feature or reporting a bug) please post to [issues](https://github.com/commit-check/commit-check/issues).
+To provide feedback (requesting a feature or reporting a bug), please post to [issues](https://github.com/commit-check/commit-check/issues).
diff --git a/action.yml b/action.yml
index cdd75ea..eb12512 100644
--- a/action.yml
+++ b/action.yml
@@ -29,6 +29,10 @@ inputs:
description: check current branch is rebased onto target branch
required: false
default: false
+ imperative:
+ description: check commit message is in imperative mood
+ required: false
+ default: false
dry-run:
description: run checks without failing
required: false
@@ -66,7 +70,7 @@ runs:
fi
# Install artifact
- python3 -m pip install commit_check-*.whl PyGithub-*.whl
+ python3 -m pip install commit_check-*.whl pygithub-*.whl
python3 "$GITHUB_ACTION_PATH/main.py"
env:
@@ -76,6 +80,7 @@ runs:
AUTHOR_EMAIL: ${{ inputs.author-email }}
COMMIT_SIGNOFF: ${{ inputs.commit-signoff }}
MERGE_BASE: ${{ inputs.merge-base }}
+ IMPERATIVE: ${{ inputs.imperative }}
DRY_RUN: ${{ inputs.dry-run }}
JOB_SUMMARY: ${{ inputs.job-summary }}
PR_COMMENTS: ${{ inputs.pr-comments }}
diff --git a/main.py b/main.py
index 87434ec..ef9c920 100755
--- a/main.py
+++ b/main.py
@@ -17,6 +17,7 @@
AUTHOR_EMAIL = os.getenv("AUTHOR_EMAIL", "false")
COMMIT_SIGNOFF = os.getenv("COMMIT_SIGNOFF", "false")
MERGE_BASE = os.getenv("MERGE_BASE", "false")
+IMPERATIVE = os.getenv("IMPERATIVE", "true")
DRY_RUN = os.getenv("DRY_RUN", "false")
JOB_SUMMARY = os.getenv("JOB_SUMMARY", "false")
PR_COMMENTS = os.getenv("PR_COMMENTS", "false")
@@ -34,6 +35,7 @@ def log_env_vars():
print(f"AUTHOR_EMAIL = {AUTHOR_EMAIL}")
print(f"COMMIT_SIGNOFF = {COMMIT_SIGNOFF}")
print(f"MERGE_BASE = {MERGE_BASE}")
+ print(f"IMPERATIVE = {IMPERATIVE}")
print(f"DRY_RUN = {DRY_RUN}")
print(f"JOB_SUMMARY = {JOB_SUMMARY}")
print(f"PR_COMMENTS = {PR_COMMENTS}\n")
@@ -48,12 +50,21 @@ def run_commit_check() -> int:
"--author-email",
"--commit-signoff",
"--merge-base",
+ "--imperative",
]
args = [
arg
for arg, value in zip(
args,
- [MESSAGE, BRANCH, AUTHOR_NAME, AUTHOR_EMAIL, COMMIT_SIGNOFF, MERGE_BASE],
+ [
+ MESSAGE,
+ BRANCH,
+ AUTHOR_NAME,
+ AUTHOR_EMAIL,
+ COMMIT_SIGNOFF,
+ MERGE_BASE,
+ IMPERATIVE,
+ ],
)
if value == "true"
]
diff --git a/requirements.txt b/requirements.txt
index e16e5b7..e5ff28b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
# Install commit-check CLI
# For details please see: https://github.com/commit-check/commit-check
-commit-check==0.9.6
+commit-check==0.10.1
# Interact with the GitHub API.
-PyGithub==2.6.1
+PyGithub==2.7.0
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy