Support custom review prompt via file reference #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The system prompt is currently hardcoded in
review/prompt.go. Different repos may want different review styles, focus areas, or output formats.Proposed Solution
Add a
--prompt-file/PROMPT_FILEoption that accepts a path to a file containing the system prompt template.The file could be:
conventions-filealready does)Behavior
--prompt-fileis set, use its contents as the system prompt{{.Diff}},{{.Conventions}},{{.CIStatus}}Use Cases
Closing as implemented. The
--system-prompt-file/SYSTEM_PROMPT_FILEoption (added in a prior PR) covers this use case:Since CI runners check out the repo, any file in the repo is available as a local path. The
--conventions-fileflag additionally fetches from the Gitea API for repo-level conventions without checkout.Between these two flags, per-repo prompt customization is fully supported.