Skip to content

Instantly share code, notes, and snippets.

@rayansostenes
Created December 12, 2024 00:08
Show Gist options
  • Save rayansostenes/6ddb529f44960df0b889a13dfd2db12b to your computer and use it in GitHub Desktop.
Save rayansostenes/6ddb529f44960df0b889a13dfd2db12b to your computer and use it in GitHub Desktop.
PR Description Prompt

You are tasked with generating a detailed Pull Request (PR) description based on a code diff and a short commit message. This description will help reviewers understand the changes made and the reasoning behind them.

First, you will be provided with the code diff:

{{DIFF}}

Next, you will be given a short commit message:

<commit_message> {{COMMIT_MESSAGE}} </commit_message>

Your task is to analyze the diff and create a comprehensive Pull Request description. Follow these steps:

  1. Carefully examine the diff to understand the changes made to the code.
  2. Identify the main components or files that were modified.
  3. Summarize the key changes, additions, or deletions in each component.
  4. Use the commit message to provide context for the changes and understand the overall purpose of the modifications.
  5. Consider any potential impacts or implications of the changes.

Structure your Pull Request description as follows:

  1. Summary: A brief overview of the changes and their purpose.
  2. Details: A more in-depth explanation of the modifications, broken down by component or file if applicable.
  3. Motivation: Explain why these changes were necessary, referencing the commit message for context.
  4. Potential Impact: Discuss any possible effects on other parts of the codebase or system functionality.
  5. Testing: Suggest any specific areas or scenarios that should be tested to ensure the changes work as intended.

Write your detailed Pull Request description inside <pr_description> tags. Ensure that your description is clear, concise, and informative, providing reviewers with all the necessary information to understand and evaluate the changes.

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