"feat(commit_handler): Update commit handler to generate commit message based on diff changes."
This commit is contained in:
parent
3bff96acab
commit
28afb4942d
@ -4,7 +4,17 @@ pub struct CommitHandler {}
|
|||||||
|
|
||||||
impl CommitHandler {
|
impl CommitHandler {
|
||||||
pub fn new() -> Option<(String, String)> {
|
pub fn new() -> Option<(String, String)> {
|
||||||
let dirs = String::from("create a short commit message from this diff, with format Task(<branch_name>): <commit_message>. only respond with the commit message");
|
let dirs = String::from(format!("
|
||||||
Some((dirs, GitGrabber::get_diff()))
|
<Variables>
|
||||||
|
change_type: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
|
||||||
|
<Commit Instructions>
|
||||||
|
create a short commit message from this entire diff, with format <change_type>(<scope>): <commit_message>.
|
||||||
|
the commit message should vaguely describe the changes present unless a small change is made that can be
|
||||||
|
precisely described withtin a short commit message
|
||||||
|
<Response Constraints>
|
||||||
|
Only respond with the commit message.
|
||||||
|
"));
|
||||||
|
let prompt = GitGrabber::get_diff();
|
||||||
|
Some((dirs, prompt))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user