Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit Check GitHub Action

License

NotificationsYou must be signed in to change notification settings

commit-check/commit-check-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

MainCommit CheckGitHub release (latest SemVer)Used byGitHub marketplaceslsa-badge

A GitHub Action for checking commit message formatting, branch naming, committer name, email, commit signoff, and more.

Table of Contents

Usage

Create a new GitHub Actions workflow in your project, e.g. at.github/workflows/commit-check.yml

name:Commit Checkon:push:pull_request:branches:'main'jobs:commit-check:runs-on:ubuntu-latestpermissions:# use permissions because use of pr-commentscontents:readpull-requests:writesteps:      -uses:actions/checkout@v4with:ref:${{ github.event.pull_request.head.sha }}# checkout PR HEAD commitfetch-depth:0# required for merge-base check      -uses:commit-check/commit-check-action@v1env:GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}# use GITHUB_TOKEN because use of pr-commentswith:message:truebranch:trueauthor-name:trueauthor-email:truecommit-signoff:truemerge-base:falseimperative:falsejob-summary:truepr-comments:${{ github.event_name == 'pull_request' }}

Used By

ApacheApache  discovery-unicampdiscovery-unicamp  Texas InstrumentsTexas Instruments  OpenCADCOpenCADC  ExtrawestExtrawestChainliftChainlift  MilaMila   andmany more.

Optional Inputs

message

  • Description: check commit message formatting convention.
  • Default:true

branch

  • Description: check git branch naming convention.
  • Default:true

author-name

  • Description: check committer author name.
  • Default:true

author-email

  • Description: check committer author email.
  • Default:true

commit-signoff

  • Description: check committer commit signature.
  • Default:true

merge-base

  • Description: check current branch is rebased onto the target branch.
  • Default:false

Important

merge-base is an experimental feature. By default, it's disabled.

To use this feature, you need to fetch all history for all branches by settingfetch-depth: 0 inactions/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.
  • Default:false

job-summary

  • Description: display job summary to the workflow run.
  • Default:true

pr-comments

  • Description: post results to the pull request comments.
  • Default:false

Important

pr-comments is an experimental feature. By default, it's disabled. To use it, you need to setGITHUB_TOKEN in the GitHub Action.

This feature currently doesn’t work with forked repositories. For more details, refer to issue#77.

Note: the default rule of above inputs is followingthis configuration. If you want to customize, just add your.commit-check.yml config file under your repository root directory.

GitHub Action Job Summary

By default, commit-check-action results are shown on the job summary page of the workflow.

Success Job Summary

Success job summary

Failure Job Summary

Failure job summary

GitHub Pull Request Comments

Success Pull Request Comment

Success pull request comment

Failure Pull Request Comment

Failure pull request comment

Badging Your Repository

You can add a badge to your repository to show your contributors/users that you use commit-check!

Commit Check

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

.. 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

Versioning

Versioning followsSemantic Versioning.

Have questions or feedback?

To provide feedback (requesting a feature or reporting a bug), please post toissues.


[8]ページ先頭

©2009-2025 Movatter.jp