Skip to content

Implement GitHub Pull Request Description Prompt Generator#22

Merged
mufeedvh merged 1 commit intomufeedvh:mainfrom
noczero:main
Jun 21, 2024
Merged

Implement GitHub Pull Request Description Prompt Generator#22
mufeedvh merged 1 commit intomufeedvh:mainfrom
noczero:main

Conversation

@noczero
Copy link
Copy Markdown
Contributor

@noczero noczero commented Jun 13, 2024

What is this?

This pull request adds a feature to generate high-quality GitHub pull request descriptions based on the comparison of git diff and git log between two branches. This is crucial for maintaining clear and consistent documentation of changes, aiding in code review and project management.

Changes

Added Features:

  1. New Functions in src/git.rs:
    • get_git_diff_between_branches: Generates a git diff between two branches.
    • get_git_log: Retrieves the git log between two branches.

Code Changes:

  1. In src/git.rs:
    • Added functions to support generating git diff and git log between branches.
    • Included necessary imports and logging statements.
  2. In src/lib.rs:
    • Updated to export new functions: get_git_diff_between_branches and get_git_log.
  3. In src/main.rs:
    • Added CLI arguments git_diff_branch and git_log_branch.
    • Implemented logic to handle these arguments and generate corresponding git diffs and logs.
  4. In templates/write-github-pull-request.hbs:
    • Created a new template for generating GitHub pull request descriptions.

Documentation Updates:

  1. In README.md:
    • Added instructions on how to use the new template for generating GitHub pull request descriptions.

Demo

demo-code2prompt-git-pull-request-description-generator

Context

N/A

@mufeedvh
Copy link
Copy Markdown
Owner

This is an interesting feature, thank you for taking the time to implement it! Code LGTM, I am merging this right away! ❤️ 🙌

@mufeedvh mufeedvh merged commit 89f30d2 into mufeedvh:main Jun 21, 2024
@noczero
Copy link
Copy Markdown
Contributor Author

noczero commented Jun 23, 2024

No worries! I'm glad you found the feature interesting. Looking forward to contributing more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants