feat(priority): Ability to push back PRs to the back of the queue
erezrokah opened this issue · comments
TLDR: Similar to priority_merge_label
but low_priority_merge_label
, where a PR is scheduled last.
This is useful for bots PRs, where we want them to always come after humans' PRs.
Found a few priority related issues, but not quite like this
Also not sure if it will work to use priority_merge_label: automerge
and automerge_label: low priority
as I remember one needs both to be in the queue
@erezrokah Thanks for the suggestion. I think the implementation would be similar to priority_merge_label. For pull requests labeled with priority_merge_label, we insert them into the Redis Sorted Set with a score of 0
instead of using the current unix timestamp as the score.
For low_priority_merge_label, we could insert the pull requests into the queue with some very high timestamp, like 4800000000
, to prioritize these pull requests last.
kodiak/bot/kodiak/evaluation.py
Lines 1171 to 1172 in ee3cd8e
Lines 588 to 592 in ee3cd8e
Thanks for the quick response @chdsbd, I can try and submit a PR for it if that makes sense
@erezrokah A PR would be great! I can help with tests and polish if you need