From 8bd1a407910f85181ffccd57c094f603f549eb90 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Wed, 27 Dec 2023 14:37:10 +0800 Subject: [PATCH 1/2] feat: add release.yml --- .github/release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..d1eca56 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,25 @@ +# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuration-options + +changelog: + exclude: + labels: + - ignore-for-release + categories: + - title: '🔥 Breaking Changes' + labels: + - 'breaking' + - title: 🏕 Features + labels: + - 'enhancement' + - title: '🐛 Bug Fixes' + labels: + - 'bug' + - title: '👋 Deprecated' + labels: + - 'deprecation' + - title: 👒 Dependencies + labels: + - dependencies + - title: Other Changes + labels: + - "*" From 3826c351c343a347f74ce4ab09b2c359dceb3f9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Dec 2023 14:38:38 +0800 Subject: [PATCH 2/2] chore(deps): bump commit-check from 0.6.3 to 0.7.0 (#28) * chore(deps): bump commit-check from 0.6.3 to 0.7.0 Bumps [commit-check](https://github.com/commit-check/commit-check) from 0.6.3 to 0.7.0. - [Release notes](https://github.com/commit-check/commit-check/releases) - [Commits](https://github.com/commit-check/commit-check/compare/v0.6.3...v0.7.0) --- updated-dependencies: - dependency-name: commit-check dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * feat: support checking committer signature * feat: support checking committer signature --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: shenxianpeng --- README.md | 9 +++++++-- action.yml | 5 +++++ entrypoint.sh | 3 +++ requirements.txt | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3512e9c..ae0507a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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` @@ -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. diff --git a/action.yml b/action.yml index 4edf280..4d02a9c 100644 --- a/action.yml +++ b/action.yml @@ -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 @@ -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 }} diff --git a/entrypoint.sh b/entrypoint.sh index d3dda19..0523cae 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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 diff --git a/requirements.txt b/requirements.txt index fe4abfc..26a8eed 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.6.3 +commit-check==0.7.0