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

disable publishing labels by default #1299

Merged
merged 2 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,25 @@ CodiumAI PR-Agent aims to help efficiently review and handle pull requests, by p

## News and Updates

### October 21, 2024
**Disable publishing labels by default:**

The default setting for `pr_description.publish_labels` has been updated to `false`. This means that labels generated by the `/describe` tool will no longer be published, unless this configuration is explicitly set to `true`.

We constantly strive to balance informative AI analysis with reducing unnecessary noise. User feedback indicated that in many cases, the original PR title alone provides sufficient information, making the generated labels (`enhancement`, `documentation`, `bug fix`, ...) redundant.
The [`review_effort`](https://qodo-merge-docs.qodo.ai/tools/review/#configuration-options) label, generated by the `review` tool, will still be published by default, as it provides valuable information enabling reviewers to prioritize small PRs first.

However, every user has different preferences. To still publish the `describe` labels, set `pr_description.publish_labels=true` in the [configuration file](https://qodo-merge-docs.qodo.ai/usage-guide/configuration_options/).
For more tailored and relevant labeling, we recommend using the [`custom_labels 💎`](https://qodo-merge-docs.qodo.ai/tools/custom_labels/) tool, that allows generating labels specific to your project's needs.

<kbd>![image](https://github.com/user-attachments/assets/8f38d222-53b1-4742-b2ec-7ea0a30c9076)</kbd>


<kbd>![image](https://github.com/user-attachments/assets/8285bd90-0dda-4c7e-9237-bbfde5e21880)</kbd>



### October 14, 2024
Improved support for GitHub enterprise server with [GitHub Actions](https://qodo-merge-docs.qodo.ai/installation/github/#action-for-github-enterprise-server)

Expand All @@ -55,7 +74,8 @@ New ability for the `review` tool - **ticket compliance feedback**. If the PR co
### September 21, 2024
Need help with PR-Agent? New feature - simply comment `/help "your question"` in a pull request, and PR-Agent will provide you with the [relevant documentation](https://github.com/Codium-ai/pr-agent/pull/1241#issuecomment-2365259334).

<kbd><img src="https://www.codium.ai/images/pr_agent/pr_help_chat.png" width="768"></kbd>
![image](https://github.com/user-attachments/assets/7c214d9c-e7bb-4028-83b6-9515d7310d19)
<img src="https://www.codium.ai/images/pr_agent/pr_help_chat.png" width="768"></kbd>



Expand Down
4 changes: 2 additions & 2 deletions docs/docs/tools/describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pr_commands = [
]

[pr_description]
publish_labels = ...
publish_labels = true
...
```

Expand All @@ -49,7 +49,7 @@ publish_labels = ...
<table>
<tr>
<td><b>publish_labels</b></td>
<td>If set to true, the tool will publish the labels to the PR. Default is true.</td>
<td>If set to true, the tool will publish labels to the PR. Default is false.</td>
</tr>
<tr>
<td><b>publish_description_as_comment</b></td>
Expand Down
2 changes: 1 addition & 1 deletion pr_agent/settings/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ maximal_review_effort=5


[pr_description] # /describe #
publish_labels=true
publish_labels=false
add_original_user_description=true
generate_ai_title=false
use_bullet_points=true
Expand Down
2 changes: 1 addition & 1 deletion pr_agent/tools/pr_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async def run(self):

if get_settings().config.publish_output:
# publish labels
if get_settings().pr_description.publish_labels and self.git_provider.is_supported("get_labels"):
if get_settings().pr_description.publish_labels and pr_labels and self.git_provider.is_supported("get_labels"):
mrT23 marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Consider adding a check for pr_labels before the conditional statement to avoid potential issues if pr_labels is None or empty. [possible issue, importance: 5]

original_labels = self.git_provider.get_pr_labels(update=True)
get_logger().debug(f"original labels", artifact=original_labels)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Consider using an f-string for the debug log message to improve readability and consistency. [enhancement, importance: 7]

Suggested change
get_logger().debug(f"original labels", artifact=original_labels)
get_logger().debug(f"original labels: {original_labels}")

user_labels = get_user_labels(original_labels)
Expand Down
Loading