AI-assisted message generation for commits and change requests
- Vorherrschende Sprache
- Go
- Sterne
- 762
- Forks
- 72
- Ø Merge
- 18 Std. 24 Min.
- Gemergte PRs (30 T.)
- 28
Beschreibung
## Problem
Commit messages and PR titles/bodies are written by hand. Users who
want to delegate that to a script or an AI assistant have no hook in
git-spice to do so, and no way to have a generated message *update* an
existing change request as a stack evolves.
## Proposal
Add user-configurable **message generation**: a `spice.messageGenerator`
config plus a `--fill`/`-c` flag that wires a script into
`commit create`, `commit amend`, `branch create`, `branch submit`, and
`branch squash`. The script generates commit messages or PR
titles/bodies from the change context.
- New `msggen` package runs scripts in shebang or `sh -c` mode and
forwards the invoking command's argv as positional parameters.
Scripts run in the repo root with context env vars
(`GS_MESSAGE_KIND`, `GS_MESSAGE_UPDATE`, `GS_BRANCH`, `GS_BASE`,
`GS_MESSAGE`, `GS_TITLE`, `GS_BODY`).
- `--fill` composes with `-m`/`-F`, so a generator failure falls back to
a user-supplied message.
- Forge support for editing a change request's subject and body
(GitHub, GitLab, Bitbucket, ShamHub) so a generator can iterate on an
open CR, not just new ones.
The shell-level contract is shared with the integration and restack
conflict resolvers (see #3 / scriptrun) so all script-driven recipes
behave consistently.
## Tracked by
- #1170 — AI message generation feature
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.