"feat(pr_handler): Add PR title and description generation \n\nPR Description:\nAdded PR title and description generation to the PrHandler struct. The new method now returns an optional tuple containing the PR title and description. The PR title is generated based on the change type and scope, while the description is generated in markdown format to describe the changes made in this diff."

This commit is contained in:
Triston Armstrong 2025-01-12 13:12:38 -05:00
parent 8445e2f076
commit 9716a6ea1b
Signed by: tristonarmstrong
GPG Key ID: A23B48AE45EB6EFE

View File

@ -3,7 +3,16 @@ use crate::git_grabber::GitGrabber;
pub struct PrHandler {}
impl PrHandler {
pub fn new() -> Option<(String, String)> {
let dirs = String::from("Pull Request Handler");
Some((dirs, GitGrabber::generate_repo_desc("", "")))
let directions = String::from("
<Variables>
change_type: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert
<PR Title>
create a short PR title from this diff, with format <change_type>(<scope>): <pr_description>.
<PR Description>
create an additional PR Description in markdown format to describe the changes made in this diff.
<Response Constraints>
Only respond with the Pr title and Pr description.
");
Some((directions, GitGrabber::generate_repo_desc()))
}
}