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

The Conventional Commits toolbox

License

NotificationsYou must be signed in to change notification settings

cocogitto/cocogitto

Cocogitto – The conventional commits tool box

GitHub Actions workflow statusCode coverage status
Conventional commitsRepository licenseDiscord logo

Website ·Installation ·Configuration

The Conventional Commits toolbox

  • Verified commits: create conventional compliant commits with ease.
  • Automatic Version bump and changelog: automatically bump versions and generate changelogs with your own custom stepsand workflows.
  • Release profiles: your branching model requires different steps for releases, pre-release, hotfixes ? We got youcovered !
  • Depends only on libgit2: cocogitto has one standalone binary, the only system dependency is libgit2.
  • Conventional git log: search your commit history matching Conventional Commits items such as scope and commit type.
  • GitHub integration: enforce the conventional commits specification with our GitHub action and bot.
  • Monorepo support: Automatic versioning for mono-repositories is supported out of the box.

Explore Cocogitto's docs  ▶

Foreword

What is it ?

Cocogitto is a CLI and GitOps toolbox for theConventional CommitsandSemver specifications.

Why ?

There are plenty of tools listed ontheconventional commits websiteto help you generate changelog, git hooks, commit template etc. Some of them are specifically designed for theConventional Commits specification, and some of them are general purpose.

Cocogitto was designed to help you respect theconventional and semver standard and is not intended to be used in any other context.

It strives to be a set of simple, modern and fast command line interfaces.

Goals

  • Make using the conventional commits spec easy and fun.
  • Enable people to focus on their work instead of correcting small mistakes and typos.
  • Enforce correctness regarding Semver and Conventional Commits.
  • Automate things when possible (ex: bumping versions).

Non goals

  • Cocogitto is not agit replacement. It uses some of libgit2 but only to provide features related to theConventional Commits specification. Anything else shall be done withgit.
  • Supporting other commit conventions or git workflows.

Quick start

This readme is a quick tour of what you can do with Cocogitto, for an in-depth guide please refertothe documentation.

Installation

Packaging status

Archlinux

pacman -S cocogitto

Cargo

cargo install --locked cocogitto

NixOS

nix-env -iA cocogitto

Void Linux

xbps-install cocogitto

MacOS

brew install cocogitto

Conventional commits

To create conventional commits you can use thecog commit command.It has subcommands for the defaultfix andfeat Conventional Commits typesplus theangular commitconventional commit types.

Example:

# With cogcog commit feat"add awesome feature"# With gitgit commit -m"feat: add awesome feature"

SeeUser guide -> Conventional commits.

Configuration

Usecog.toml file to configure your usage of Cocogitto.

For the full list of options, seeUser guide -> Configuration reference.

Auto-bumps

Creating a version withcog bump will perform the following actions :

  1. Determine a version number according to your commit history.
  2. Perform configuration defined pre-bump commands.
  3. Append the version's changelog to your repository changelog file.
  4. Create a version commit and tag it.
  5. Perform post-bump commands

Example:

# File: cog.tomlpre_bump_hooks = ["echo {{version}}",]post_bump_hooks = ["git push","git push origin {{version}}",][changelog]path ="CHANGELOG.md"template ="remote"remote ="github.com"repository ="cocogitto_bot_playground"owner ="cocogitto"authors = [  { username ="oknozor", signature ="Paul Delafosse"}]

cog bump example

Changelogs

cog changelog usestera templates to generate markdown changelogs. It has several built-intemplates, and you can define your own.

Example:

cog changelog

Output :

##1.2.0 - 2021-11-26####Bug Fixes- (**parser**)handle lowercase identifier - (7521015) -*oknozor*- handle unknown flag - (e2388dc) - oknozor####Features- (**parser**)simple parser implementation - (0b25eb6) -*oknozor*- add a new cli flag - (ff84173) - oknozor####Miscellaneous Chores-**(version)** 1.2.0 - (15d1333) -*oknozor*####Refactoring- (**parser**)use a parser interface instead of concrete impl - (ea24c36) -*oknozor*####Tests- add integration test - (bae629c) -*oknozor*

SeeUser guide -> Changelogs.

Docker

There is a docker image forcog availableghcr.io/cocogitto/latest.

Usage:

docker pull ghcr.io/cocogitto/cog:latestdocker run -t -v"$(pwd)":/app/ check

Note that you need to mount a volume pointing to your target directory forcog to be able to operate on your git log.

SeeDocker -> Using cocogitto with docker.

GitHub integration

GitHub action:

You can run cog check and perform automatic releases via GitHub actionusingcocogitto-action.

Example:

  -name:Semver releaseuses:cocogitto/cocogitto-action@mainwith:release:truegit-user:'Cog Bot'git-user-email:'mycoolproject@org.org'

SeeGithub integration -> GitHub action

GitHub bot:

cocogitto-bot is a standalone, zero-config bot checking your pull requestsagainst the Conventional Commits specification.

cog bot example

SeeGithub integration -> GitHub-bot

Similar projects

Contributing

Found a bug, have a suggestion for a new feature? Please read thecontribution guideline andsubmit an issue.

Licence

All the code in this repository is released under the MIT License, for more information take a look attheLICENSE file.

Sponsor this project

 

Packages

 
 
 

[8]ページ先頭

©2009-2025 Movatter.jp