-
Notifications
You must be signed in to change notification settings - Fork 590
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
feat: handle gitlab MR draft status #1165
feat: handle gitlab MR draft status #1165
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨
|
/review |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
/improve |
1 similar comment
/improve |
PR Code Suggestions ✨Latest suggestions up to ee15a8a
Previous suggestions✅ Suggestions up to commit 978c445
|
@paolomainardi The PR should be four lines. something like:
|
Ok @mrT23, I simplified it as requested and removed the refactoring part. |
055c4cd
to
ffaf5d5
Compare
pr_agent/settings/configuration.toml
Outdated
@@ -230,6 +230,7 @@ push_commands = [ | |||
"/describe", | |||
"/review --pr_reviewer.num_code_suggestions=0", | |||
] | |||
skip_draft_mr = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this. it's a dead configuration. should be 'true' always
(and putting something by default as 'False' is like saying that no one will ever use it. We do want to use it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what do you mean by "dead configuration", there are tons of "false" in the default settings file, maybe I am missing something.
This line serves to:
- Let the users know that configuration exists and that the default is false. Otherwise where are documented ?
- If we set it to true it means introducing a breaking change, as now draft requests are handled as the others. I did it on purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead configuration means something so exotic that 99.9% of PR-agent users won't ever change.
And in addition, here you have (for a 'dead configuration') a wrong default value.
A change is for the entire community. And its usage should be from the viewpoint of the entire community, and the entire code repo.
Since the correct behaviour is to avoid draft PRs (this is already done, without config, in github) we should do it also in Gitlab.
if possible and logical, the best configuration is no configuration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, to ensure I understood it well, are you proposing to always skip draft MR without having any configuration toggle?
There could be use cases where you want it enabled, and dropping it entirely seems a bit drastic.
I still don't understand why default to false should be a "wrong value."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mrT23 anyway, just committed a version without any configuration toggle, we always skip it when the MR is in draft status.
/describe |
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Description updated to latest commit (8793f8d)
|
/review |
PR Reviewer Guide 🔍
|
/describe |
PR Description updated to latest commit (3778cc2)
|
thanks @paolomainardi |
@mrT23 I am wondering if it is ok the scenario where we don't process comments when the MR is in the draft status; I see scenarios where you are developing and What do you think @mrT23 ? If I understood correctly, the GitHub app excludes just the MR open event when in the draft. |
people can always do online commenting we are talking here about auto comments |
This MR inhibits manual comments even when the MR is in draft. UPDATE: #1165 - With this, MR comments are processed again. |
User description
closes #1160
As reported in the issue, this MR adds the possibility to skip MR in draft status, default is false when enabled every command is logged and discarded.
PR Type
Enhancement
Description
Changes walkthrough 📝
gitlab_webhook.py
Handle GitLab merge request draft status
pr_agent/servers/gitlab_webhook.py
comments on existing MRs