mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 04:45:47 +02:00
add conventional commit template
parent
2293541e32
commit
512dca0c16
1 changed files with 67 additions and 0 deletions
|
@ -344,4 +344,71 @@ customCommands:
|
||||||
title: "Remote branch:"
|
title: "Remote branch:"
|
||||||
suggestions:
|
suggestions:
|
||||||
command: "git branch --remote --list '{{.Form.Remote}}/*' --format='%(refname:short)' | sed 's/{{.Form.Remote}}\\///'"
|
command: "git branch --remote --list '{{.Form.Remote}}/*' --format='%(refname:short)' | sed 's/{{.Form.Remote}}\\///'"
|
||||||
|
```
|
||||||
|
|
||||||
|
## Conventional commit
|
||||||
|
|
||||||
|
Prompts to follow the [conventional commits](https://www.conventionalcommits.org/) pattern.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
customCommands:
|
||||||
|
- key: "<c-v>"
|
||||||
|
context: "global"
|
||||||
|
description: "Create new conventional commit"
|
||||||
|
prompts:
|
||||||
|
- type: "menu"
|
||||||
|
key: "Type"
|
||||||
|
title: "Type of change"
|
||||||
|
options:
|
||||||
|
- name: "build"
|
||||||
|
description: "Changes that affect the build system or external dependencies"
|
||||||
|
value: "build"
|
||||||
|
- name: "feat"
|
||||||
|
description: "A new feature"
|
||||||
|
value: "feat"
|
||||||
|
- name: "fix"
|
||||||
|
description: "A bug fix"
|
||||||
|
value: "fix"
|
||||||
|
- name: "chore"
|
||||||
|
description: "Other changes that don't modify src or test files"
|
||||||
|
value: "chore"
|
||||||
|
- name: "ci"
|
||||||
|
description: "Changes to CI configuration files and scripts"
|
||||||
|
value: "ci"
|
||||||
|
- name: "docs"
|
||||||
|
description: "Documentation only changes"
|
||||||
|
value: "docs"
|
||||||
|
- name: "perf"
|
||||||
|
description: "A code change that improves performance"
|
||||||
|
value: "perf"
|
||||||
|
- name: "refactor"
|
||||||
|
description: "A code change that neither foxes a bug nor adds a feature"
|
||||||
|
value: "refactor"
|
||||||
|
- name: "revert"
|
||||||
|
description: "Reverts a previous commit"
|
||||||
|
value: "revert"
|
||||||
|
- name: "style"
|
||||||
|
description: "Changes that do not affect the meaning of the code"
|
||||||
|
value: "style"
|
||||||
|
- name: "test"
|
||||||
|
description: "Adding missing tests or correcting existing tests"
|
||||||
|
value: "test"
|
||||||
|
- type: "input"
|
||||||
|
title: "Scope - Add '(<scope>)'"
|
||||||
|
key: "Scope"
|
||||||
|
initialValue: ""
|
||||||
|
- type: "input"
|
||||||
|
title: "Breaking change - Add '!'"
|
||||||
|
key: "Breaking"
|
||||||
|
initialValue: ""
|
||||||
|
- type: "input"
|
||||||
|
title: "message"
|
||||||
|
key: "Message"
|
||||||
|
initialValue: ""
|
||||||
|
- type: "confirm"
|
||||||
|
key: "Confirm"
|
||||||
|
title: "Commit"
|
||||||
|
body: "Are you sure you want to commit?"
|
||||||
|
command: "git commit --message '{{.Form.Type}}{{.Form.Scope}}{{.Form.Breaking}}: {{.Form.Message}}'"
|
||||||
|
loadingText: "Creating conventional commit..."
|
||||||
```
|
```
|
Loading…
Add table
Add a link
Reference in a new issue