Skip to content
Public template

About

Repository template

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

repository-template

prek

This is a general template repository.

GitHub Actions Permissions Setup

The version-bump workflow creates pull requests, which requires the following setting to be enabled:

  1. Go to the Settings tab of your repository.
  2. On the left-hand menu, select Actions/General.
  3. Under the Workflow permissions section, enable Allow GitHub Actions to create and approve pull requests.
  4. Save the changes.

Pre-commit Hooks Setup

This template recommends using prek (a faster, drop-in alternative to pre-commit).

Install prek by following its installation guide, then install the hooks:

prek install

If you prefer pre-commit, install it and run:

pre-commit install

The hook types to install are set by default_install_hook_types in .pre-commit-config.yaml.

Commit Message Linting with Commitizen

This template repository enforces Conventional Commits in pre-commit hooks and CI, so your commit messages must follow that format.

You can maintain Conventional Commits manually, but automation tools such as Commitizen or cz-git can help. Any tool is fine, but this repository uses commitizen-tools/commitizen for checks, so it is recommended.

Install Commitizen:

uv tool install commitizen

Use Commitizen instead of git commit:

cz commit

For more details, see Commitizen documentation.

Version Bumping by Labels

This repository is configured to automatically bump the version when a pull request is merged with one of the following labels:

  • update::major
  • update::minor
  • update::patch

Simply add one of these labels to your pull request before merging. A new pull request for the version bump will be automatically created.

The version number is managed via the .bumpversion.toml file in the repository root. If your project defines its version in specific files (e.g., pyproject.toml, Cargo.toml, etc.), you may need to add entries like the following to .bumpversion.toml:

[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

For more details, see conjikidow/bump-version-action.

About

Repository template

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors