Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Update PR Description Configuration and Prompts #542

Merged
merged 2 commits into from
Dec 21, 2023

Conversation

mrT23
Copy link
Collaborator

@mrT23 mrT23 commented Dec 21, 2023

Type

Enhancement


Description

This PR includes several updates to the PR description configuration and prompts:

  • Removed the 'use_bullet_points' variable from the 'vars' dictionary in 'pr_description.py' and 'pr_generate_labels.py'.
  • Added a method '_prepare_data' in 'pr_description.py' to reorder the keys in the 'data' dictionary.
  • Updated the prompts for PR description in 'pr_description_prompts.toml' to include options for custom labels and semantic file types.
  • Changed the order of keys in the PRDescription class in 'pr_description_prompts.toml'.

PR changes walkthrough

Relevant files                                                                                                                                 
Configuration changes
3 files
pr_description.py                                                                                     
    pr_agent/tools/pr_description.py

    The 'use_bullet_points' variable was removed from the 'vars'
    dictionary. A new method '_prepare_data' was added to
    reorder the keys in the 'data' dictionary.

+12/-1
pr_generate_labels.py                                                                             
    pr_agent/tools/pr_generate_labels.py

    The 'use_bullet_points' variable was removed from the 'vars'
    dictionary.

+0/-1
pr_description_prompts.toml                                                                 
    pr_agent/settings/pr_description_prompts.toml

    The prompts for PR description were updated to include
    options for custom labels and semantic file types. The order
    of keys in the PRDescription class was changed.

+21/-25

Copy link
Contributor

PR Description updated to latest commit (9995ccd)

Copy link
Contributor

PR Analysis

  • 🎯 Main theme: Updating PR description prompts in the pr_agent/settings/pr_description_prompts.toml file
  • 📝 PR summary: This PR introduces changes to the pr_agent/settings/pr_description_prompts.toml file. It adds conditionals for enabling custom labels and semantic file types in the PR description prompts, reorders the sections in the PR description prompts and example output, and removes the main_files_walkthrough field.
  • 📌 Type of PR: Enhancement
  • 🧪 Relevant tests added: No
  • ⏱️ Estimated effort to review [1-5]: 2, because the changes are mostly configuration updates and do not involve complex logic or functionality.
  • 🔒 Security concerns: No security concerns found

PR Feedback

  • 💡 General suggestions: The changes made in the PR seem to be well thought out and are likely to improve the functionality of the system. However, it would be beneficial to add some comments in the toml file to explain the purpose of the changes and how they affect the system.

  • 🤖 Code feedback:
    relevant filepr_agent/settings/pr_description_prompts.toml
    suggestion      Consider adding comments to explain the purpose and effect of the new conditionals. This will make the code easier to understand for other developers. [medium]
    relevant line{%- if enable_custom_labels %}

    relevant filepr_agent/settings/pr_description_prompts.toml
    suggestion      It might be beneficial to add a default value for the `enable_custom_labels` and `enable_semantic_files_types` variables in case they are not provided. This will prevent potential errors. [important]
    relevant line{%- if enable_custom_labels %}

How to use

Instructions

To invoke the PR-Agent, add a comment using one of the following commands:
/review: Request a review of your Pull Request.
/describe: Update the PR title and description based on the contents of the PR.
/improve [--extended]: Suggest code improvements. Extended mode provides a higher quality feedback.
/ask <QUESTION>: Ask a question about the PR.
/update_changelog: Update the changelog based on the PR's contents.
/add_docs: Generate docstring for new components introduced in the PR.
/generate_labels: Generate labels for the PR based on the PR's contents.
see the tools guide for more details.

To edit any configuration parameter from the configuration.toml, add --config_path=new_value.
For example: /review --pr_reviewer.extra_instructions="focus on the file: ..."
To list the possible configuration parameters, add a /config comment.

@mrT23 mrT23 changed the title feat: Update PR description prompts in toml file to include semantic … Enhancement: Update PR description prompts and reorder keys in PR description data Dec 21, 2023
@mrT23 mrT23 added the enhancement New feature or request label Dec 21, 2023
@mrT23
Copy link
Collaborator Author

mrT23 commented Dec 21, 2023

PR Description updated to latest commit (eca8078)

@mrT23
Copy link
Collaborator Author

mrT23 commented Dec 21, 2023

PR Description updated to latest commit (eca8078)

@mrT23 mrT23 changed the title Enhancement: Update PR description prompts and reorder keys in PR description data Enhancement: Update PR Description Configuration and Prompts Dec 21, 2023
@mrT23
Copy link
Collaborator Author

mrT23 commented Dec 21, 2023

PR Description updated to latest commit (eca8078)

@mrT23
Copy link
Collaborator Author

mrT23 commented Dec 21, 2023

/describe

Copy link
Contributor

PR Description updated to latest commit (eca8078)

@mrT23 mrT23 merged commit 64a2c55 into main Dec 21, 2023
3 checks passed
@mrT23 mrT23 deleted the tr/title_last branch December 21, 2023 11:55
@almog-lv
Copy link
Contributor

almog-lv commented Jan 1, 2024

/describe

Copy link
Contributor

PR Description updated to latest commit (eca8078)

@codiumai-pr-agent-pro codiumai-pr-agent-pro bot removed the enhancement New feature or request label Jan 1, 2024
yochail pushed a commit to yochail/pr-agent that referenced this pull request Feb 11, 2024
Enhancement: Update PR description prompts and reorder keys in PR description data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants