Skip to content

Commit 5d33af7

Browse files
author
Xianpeng Shen
committed
feat: support checking committer signature
1 parent 8cf7564 commit 5d33af7

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
### `message`
4040

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

4545
### `branch`
@@ -58,6 +58,11 @@ jobs:
5858
- **Description**: check committer author email
5959
- Default: 'true'
6060

61+
### `commit-signoff`
62+
63+
- **Description**: check committer commit signature
64+
- Default: 'true'
65+
6166
### `dry-run`
6267

6368
- **Description**: run checks without failing. exit code is 0 otherwise is 1.

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ inputs:
2121
description: check committer author email
2222
required: false
2323
default: true
24+
commit-signoff:
25+
description: check committer commit signature
26+
required: false
27+
default: true
2428
dry-run:
2529
description: run checks without failing
2630
required: false
@@ -48,5 +52,6 @@ runs:
4852
BRANCH: ${{ inputs.branch }}
4953
AUTHOR_NAME: ${{ inputs.author-name }}
5054
AUTHOR_EMAIL: ${{ inputs.author-email }}
55+
COMMIT_SIGNOFF: ${{ inputs.commit-signoff }}
5156
DRY_RUN: ${{ inputs.dry-run }}
5257
JOB_SUMMARY: ${{ inputs.job-summary }}

entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ run_commit_check(){
1717
if [[ "$AUTHOR_EMAIL" == "true" ]]; then
1818
args="$args --author-email"
1919
fi
20+
if [[ "$COMMIT_SIGNOFF" == "true" ]]; then
21+
args="$args --commit-signoff"
22+
fi
2023

2124
echo "commit-check $args"
2225
commit-check $args > result.txt

0 commit comments

Comments
 (0)