Open
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:
customCommands:
- key: "<c-a>"
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"
- Get all trailer tags, including a few handy defaults:
Signed-off-by
Co-authored-by
Reviewed-by
Helped-by
- Ask for the user, defaulting to the user's config
- Append trailer
Optional:
- Detect conflicts and ask if the user wants to append or override; or
- Provide a menu asking which trailer the user wishes to delete or modify, or add a new trailer.