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

Enhance variable consistency in prompt rendering for PR tools #1154

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

KennyDizi
Copy link
Contributor

@KennyDizi KennyDizi commented Aug 18, 2024

PR Type

Enhancement, Refactoring


Description

  • Improved variable consistency in prompt rendering for PR description and label generation flows
  • Updated _get_prediction methods in both pr_description.py and pr_generate_labels.py files
  • Changed variables to self.variables when rendering system and user prompts
  • Ensures consistent use of class instance variables across the codebase

Changes walkthrough

Relevant files
Refactoring
pr_description.py
Update variable references in PR description tool               

pr_agent/tools/pr_description.py

  • Updated variable references in _get_prediction method
  • Changed variables to self.variables in prompt rendering
  • +2/-2     
    pr_generate_labels.py
    Refactor variable usage in PR label generation tool           

    pr_agent/tools/pr_generate_labels.py

  • Modified variable references in _get_prediction method
  • Replaced variables with self.variables in prompt rendering
  • +2/-2     

    @KennyDizi KennyDizi changed the title Improve variable consistency in prompt rendering Enhance variable consistency in prompt rendering for PR tools Aug 18, 2024
    @KennyDizi
    Copy link
    Contributor Author

    🏜️ 🏡 The PR description has been updated to align with the latest commit (f9de8f2).

    @KennyDizi
    Copy link
    Contributor Author

    PR Analysis 🐲


    ⏰  Estimated effort to review 1, because the changes are straightforward refactoring for consistency, involving minimal lines of code.

    🥇  Score 95, because the PR improves code consistency and readability without introducing any apparent issues.

    🧪  No relevant tests

    🔒  No security concerns identified

    👑  No key issues to review This PR focuses on enhancing variable consistency in prompt rendering by changing the usage of `variables` to `self.variables` in the `_get_prediction` methods of `pr_description.py` and `pr_generate_labels.py`. This refactoring ensures consistent use of class instance variables across the codebase, improving code maintainability and readability.

    @mrT23 mrT23 merged commit 2e186eb into Codium-ai:main Aug 19, 2024
    2 checks passed
    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