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

Refactoring PR label handling, enhancing language detection, and updating CLI commands #447

Merged
merged 18 commits into from
Nov 26, 2023

Conversation

mrT23
Copy link
Collaborator

@mrT23 mrT23 commented Nov 12, 2023

Type

Refactoring, Enhancement, Tests


Description

This Pull Request introduces several changes:

  • Refactors the way custom labels are handled in the PR agent, replacing the previous string concatenation with a class-based approach.
  • Updates CLI commands to include new functionalities such as 'add_docs' and 'generate_labels'.
  • Changes the way PR types are referenced in the code, moving from 'PR Type' and 'PR Labels' to 'type' and 'labels'.
  • Updates the TOML configuration files to reflect the new Pydantic model definitions for labels and PR descriptions.
  • Moves the 'clip_tokens' function from 'pr_processing' to 'utils' module and adds corresponding tests.
  • Enhances readability in TOML files and adds verbosity level logging in 'pr_generate_labels.py'.
  • Updates the method of determining the main PR language by using a language-extension map.

PR Files Labels

Relevant files                                                                                                                        
Refactoring
files:
  • pr_agent/tools/pr_description.py
  • pr_agent/git_providers/git_provider.py
  • pr_agent/algo/utils.py
  • pr_agent/tools/pr_generate_labels.py
  • pr_agent/algo/pr_processing.py
  • pr_agent/algo/language_handler.py
  • pr_agent/cli.py
  • pr_agent/git_providers/codecommit_provider.py
  • pr_agent/git_providers/azuredevops_provider.py
  • pr_agent/git_providers/github_provider.py
  • pr_agent/git_providers/gitlab_provider.py
  • pr_agent/git_providers/azuredevops_provider.py
Enhancement
files:
  • pr_agent/git_providers/git_provider.py
  • pr_agent/algo/utils.py
  • pr_agent/tools/pr_generate_labels.py
  • pr_agent/cli.py
  • pr_agent/settings/pr_custom_labels.toml
  • pr_agent/settings/pr_information_from_user_prompts.toml
  • pr_agent/settings/custom_labels.toml
Tests
files:
  • tests/unittest/test_clip_tokens.py

@mrT23 mrT23 changed the title Tr/pydantic Refactor PR label handling and update CLI commands Nov 12, 2023
@mrT23 mrT23 added enhancement New feature or request Refactoring labels Nov 12, 2023
@mrT23 mrT23 added medium documentation Improvements or additions to documentation enhancement New feature or request Refactoring Easy PR and removed enhancement New feature or request Refactoring medium documentation Improvements or additions to documentation Easy PR labels Nov 13, 2023
Copy link
Contributor

@barnett-yuxiang barnett-yuxiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty cool

@mrT23 mrT23 added documentation Improvements or additions to documentation enhancement New feature or request Refactoring Review effort [1-5] - 3 Other and removed documentation Improvements or additions to documentation enhancement New feature or request labels Nov 13, 2023
@Codium-ai Codium-ai deleted a comment from CodiumAI-Agent Nov 15, 2023
@mrT23
Copy link
Collaborator Author

mrT23 commented Nov 26, 2023

Persistent review updated to latest commit 1a28c77

@mrT23 mrT23 merged commit d4e979c into main Nov 26, 2023
2 checks passed
@mrT23 mrT23 deleted the tr/pydantic branch November 26, 2023 07:37
@hussam789
Copy link
Collaborator

PR Description updated to latest commit (668041c)

1 similar comment
@hussam789
Copy link
Collaborator

PR Description updated to latest commit (668041c)

@hussam789 hussam789 changed the title Refactor PR label handling and update CLI commands Refactor PR label handling, update CLI commands, and enhance language detection Dec 4, 2023
@hussam789 hussam789 added the Tests label Dec 4, 2023
@hussam789
Copy link
Collaborator

PR Description updated to latest commit (668041c)

1 similar comment
@hussam789
Copy link
Collaborator

PR Description updated to latest commit (668041c)

@hussam789 hussam789 changed the title Refactor PR label handling, update CLI commands, and enhance language detection Refactoring PR label handling, enhancing language detection, and updating CLI commands Dec 4, 2023
@hussam789
Copy link
Collaborator

PR Description updated to latest commit (668041c)

2 similar comments
@hussam789
Copy link
Collaborator

PR Description updated to latest commit (668041c)

@hussam789
Copy link
Collaborator

PR Description updated to latest commit (668041c)

yochail pushed a commit to yochail/pr-agent that referenced this pull request Feb 11, 2024
Refactor PR label handling and update CLI commands
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