-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
[ADD] task to set ready to merge label #1
Conversation
b4ac4d1
to
541c5e1
Compare
|
||
|
||
APPROVALS_REQUIRED = 2 | ||
MIN_PR_AGE = 5 # days |
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.
Maybe we could use something like that to avoid counting down on Saturdays and Sundays by default.
https://gist.github.com/JosefJezek/275b2c667698aabd6969
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.
Yes, that would be a nice improvement. I'll try to make the basic version work first, then we can improve.
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.
@damdam-s if you think it's important to not count week-ends in the 5 days, can you open an issue for discussion?
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.
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.
Nice idea.
Some improvements proposed for more flexibility
_logger = getLogger(__name__) | ||
|
||
|
||
APPROVALS_REQUIRED = 2 |
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.
Maybe this value of 2
can be a fallback for a customized value on each repository.
This would allow more flexiblity and this kind" of rule could be managed by the PSC of the repo they are responsible of.
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.
The question would be where to configure these parameters per repo. In any case, these label are only advisory.
bd1c10a
to
3acc6c7
Compare
I reworked the logic to make a cron unncessary and only react on PR events. |
806a1ff
to
11d018c
Compare
11d018c
to
1064d27
Compare
@OCA/board this PR is deployed since Saturday. |
This has been running fine for a week, was discussed on the board and approved by @max3903 so merging. |
@sbidoul the only problem I see with this is that when we approve a PR with 2 approvals, but not 5 days, when the 5 days have passed, unless you make an additional comment or any action on the PR, there's no notification of ready to merge. |
@pedrobaeza it is handled correctly: there is a task running hourly to set the ready to merge tag. So if all conditions are met, the ready to merge tag will appear 5 days after creation of the PR. |
Ah, great, I thought that you removed all crons and only acts on hooks. |
Improve the KO message on how to proceed for CLA
* function to check if a user can git push * webhook on pull request comments to parse and run /ocabot commands
Extracted from OCA/maintainer-tools#346
TODO
cron to run the task nightly on all repos(or maybe not: we would quickly explode the API rate limit)