jesseduffield / jesseduffield/lazygit
Amend commit attribute enhancements
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
**Is your feature request related to a problem? Please describe.**
I don't like typing `Signed-off-by` or any other user-related trailers
**Describe the solution you'd like**
This menu should also feature other trailers, like `Signed-off-by`, `Reviewed-by` or any other trailers featured in previous commits

**Describe alternatives you've considered**
I made my own custom command, but it doesn't work on previous commits.
**Additional context**
Add any other context or screenshots about the feature request here.
Custom command:
```yaml
customCommands:
- key: ""
context: "files"
command: "git commit --amend --trailer {{ .Form.Trailer | quote }}:{{ .Form.Author | quote }} --only -m {{ runCommand \"git --no-pager log --pretty=%B -n 1\" | quote }}"
prompts:
- type: "input"
title: "Key"
key: "Trailer"
suggestions:
command: |
(git log --pretty=%B | grep -E '^[A-Z][A-Za-z-]+: .*<.*@.*>' | awk -F: '{print $1}'; echo -e 'Signed-off-by\nCo-authored-by\nReviewed-by\nHelped-by') | sort -u
- type: "input"
title: "User"
key: "Author"
initialValue: "{{ runCommand \"git config user.name\" }} <{{ runCommand \"git config user.email\" }}>"
suggestions:
preset: "authors"
```
1. Get all trailer tags, including a few handy defaults:
- `Signed-off-by`
- `Co-authored-by`
- `Reviewed-by`
- `Helped-by`
2. Ask for the user, defaulting to the user's config
3. Append trailer
Optional:
1. Detect conflicts and ask if the user wants to append or override; or
2. Provide a menu asking which trailer the user wishes to delete or modify, or add a new trailer.
Contributor guide
Assessment
This issue has not been assessed yet.