Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,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, committer name, email, and more.
A Github Action for checking commit message formatting, branch naming, committer name, email, commit signoff and more.

## Usage

Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
### `message`

- **Description**: check commit message formatting convention.
- By default the rule follows [conventionalcommits](https://www.conventionalcommits.org/).
- By default the rule follows [conventional commits](https://www.conventionalcommits.org/).
- Default: 'true'

### `branch`
Expand All @@ -58,6 +58,11 @@ jobs:
- **Description**: check committer author email
- Default: 'true'

### `commit-signoff`

- **Description**: check committer commit signature
- Default: 'true'

### `dry-run`

- **Description**: run checks without failing. exit code is 0 otherwise is 1.
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
description: check committer author email
required: false
default: true
commit-signoff:
description: check committer commit signature
required: false
default: true
dry-run:
description: run checks without failing
required: false
Expand Down Expand Up @@ -48,5 +52,6 @@ runs:
BRANCH: ${{ inputs.branch }}
AUTHOR_NAME: ${{ inputs.author-name }}
AUTHOR_EMAIL: ${{ inputs.author-email }}
COMMIT_SIGNOFF: ${{ inputs.commit-signoff }}
DRY_RUN: ${{ inputs.dry-run }}
JOB_SUMMARY: ${{ inputs.job-summary }}
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ run_commit_check(){
if [[ "$AUTHOR_EMAIL" == "true" ]]; then
args="$args --author-email"
fi
if [[ "$COMMIT_SIGNOFF" == "true" ]]; then
args="$args --commit-signoff"
fi

echo "commit-check $args"
commit-check $args > result.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Install commit-check CLI
# For details please see: https://github.com/commit-check/commit-check
commit-check==0.6.3
commit-check==0.7.0