Open dpraul opened 4 years ago
That's a cool idea. I don't think it would be too difficult to add, but I'm unsure of how to express this in .kodiak.toml
.
These are a few ideas I came up with:
verbose
[merge.automerge_schedule.days.sunday]
start = 07:32:00
end = 12:32:00
[merge.automerge_schedule.days.monday]
start = 07:32:00
end = 12:32:00
[merge.automerge_schedule.days.tuesday]
start = 07:32:00
end = 12:32:00
[merge.automerge_schedule.days.wednesday]
start = 07:32:00
end = 12:32:00
[merge.automerge_schedule.days.thursday]
start = 07:32:00
end = 12:32:00
[merge.automerge_schedule.days.friday]
start = 07:32:00
end = 12:32:00
[merge.automerge_schedule.days.saturday]
start = 07:32:00
end = 12:32:00
inline
[merge.automerge_schedule.days]
monday = {start = 07:32:00, end = 12:32:00}
tuesday = {start = 07:32:00, end = 12:32:00}
wednesday = {start = 07:32:00, end = 12:32:00}
thursday = {start = 07:32:00, end = 12:32:00}
friday = {start = 07:32:00, end = 12:32:00}
saturday = {start = 07:32:00, end = 12:32:00}
sunday = {start = 07:32:00, end = 12:32:00}
minimalist
[merge.automerge_schedule.days]
monday = [07:32:00, 12:32:00]
tuesday = [07:32:00, 12:32:00]
wednesday = [07:32:00, 12:32:00]
thursday = [07:32:00, 12:32:00]
friday = [07:32:00, 12:32:00]
saturday = [07:32:00, 12:32:00]
sunday = [07:32:00, 12:32:00]
I'm curious if you have any other suggestions.
EDIT: looking at this a couple times more I think I'm personally learning towards the inline exmaple
Also needs a timezone setting of some sort
I imagine it should also account for:
Inline is easiest to read but I think it makes it hard to account for (2) - but that's not totally essential to optimize for
Maybe something like this where we have some global settings and allow individual days to be overridden.
[merge.automerge_schedule]
timezone = 'America/New_York'
# specify global start/end times
start = 07:32:00
end = 12:32:00
# override global times by day
[merge.automerge_schedule.days]
monday = {start = 07:32:00, end = 12:32:00}
tuesday = {start = 07:32:00, end = 12:32:00}
wednesday = {start = 07:32:00, end = 12:32:00}
thursday = {start = 07:32:00, end = 12:32:00}
friday = {start = 07:32:00, end = 12:32:00}
# don't merge on specific days by setting an empty table
saturday = {}
# alternatively I think using a boolean is more clear
sunday = false
that makes sense to me!
Would your expectation be that if a PR was opened outside of the merge window, it would be merge upon the next opening?
I guess that would require a bit more work than simply ignoring a PR outside of the window because Kodiak would need to track PRs opened outside the window and trigger evaluation once the new time period comes around. Anyway, I think I know how to do it.
EDIT: Also, is this something you're still interested in seeing in Kodiak?
Yes, I think I would expect it to keep track and start merging again once the next merge window opens.
And yes, still interested in seeing this - it would make kodiak more compelling for us
I found this GitHub bot which you can configure to block merging based on a schedule. It doesn't completely solve this issue because it will block merging completely, not just auto merging.
@chdsbd came here searching for a feature to setup scheduled merges. like add automerge label but merge it a specific time instead of doing it immediately. maybe a separate label along with automerge to specify the time of merge?
I guess it could be pretty easy to setup a github action which errors when started within the time-window. Additionally mark this check as mandatory, so dependabot will not merge until this check is green
Hi! Great bot - hoping to integrate it further as we play around with it more.
Dependabot has an excellent setting where auto-merging can be restricted to only occur during working hours, like so:
Would love to see a feature like this here!