Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mishamyrt/ticketeer
📝 Utility to insert ticket id into commit message.
https://github.com/mishamyrt/ticketeer
automation code-quality git-hooks
Last synced: 25 days ago
JSON representation
📝 Utility to insert ticket id into commit message.
- Host: GitHub
- URL: https://github.com/mishamyrt/ticketeer
- Owner: mishamyrt
- License: mit
- Created: 2024-12-14T16:38:00.000Z (26 days ago)
- Default Branch: main
- Last Pushed: 2024-12-15T09:10:26.000Z (25 days ago)
- Last Synced: 2024-12-15T10:22:25.288Z (25 days ago)
- Topics: automation, code-quality, git-hooks
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ticketeer [![Quality assurance](https://github.com/mishamyrt/ticketeer/actions/workflows/quality-assurance.yaml/badge.svg)](https://github.com/mishamyrt/ticketeer/actions/workflows/quality-assurance.yaml)
Utility to insert task ticket id into commit message.
- **Simple**. Does not need to be configured;
- **Environment agnostic**. Works with any platform that can run git;
- **Fast**. Won't slow down your commit process as actions are performed instantly.## Usage
Add a `ticketeer apply` command call to the `prepare-commit-msg` hook in your hook runner.
For example, for [lefthook](https://github.com/evilmartians/lefthook/tree/master) it would look like this:```yaml
prepare-commit-msg:
commands:
append-ticket-id:
run: ticketeer apply
```## Configuration
Ticketeer is configured by default to be as comfortable as possible for most, but the settings can be overridden. All options are optional (hehe), if you don't specify your own - default value will be used.
- `message`
- `location` - where to insert ticket id into commit message (`title` or `body`).
- `template` - template to use when inserting ticket id into commit message. Must include `{ticket}` variable.
- `ticket`
- `format` - format of ticket id (`numeric`, `alphanumeric`, `alphanumeric-small`, `alphanumeric-caps`).
- `allow-empty` - allow empty ticket id. If set to `false`, commit will be aborted if branch name doesn't contain ticket id.
- `branch`
- `format` - format of branch name (`git-flow`, `git-flow-typeless`, `ticket-id`).
- `ignore` - Additional list of branch names to ignore. Default value is `["main", "master", "develop", "dev", "release/*"]`.Default configuration is as follows:
```yaml
message:
location: body
template: "{ticket}"
ticket:
format: alphanumeric-caps
allow-empty: true
branch:
format: git-flow
```