Automatically check / update other MRs after merge
Currently Dependabot only checks for updates on schedule or when triggered manually.
When Dependabot creates a bunch of MRs, potential conflicts are only detected on the next run.
Currently this is at least daily, so I would have to wait (up to) 24h or even more (on weekly/monthly schedule) until Dependabot rebases conflicting MRs.
Given this workflow developers cannot crunch Dependabot MRs as they always have to check and rebase every other MR themselves.
I therefore suggest some automatism that works independently from the regular update schedule:
-
When a MR gets merged, Dependabot receives this update via /api/hooks
.
This information is currently only used to update the internal MR information inMergeRequestEventHandler
-
Start a request against /projects/:id/merge_requests?state=opened&with_merge_status_recheck=true&iids[]=<known Dependabot MR iids>
(documentation),with_merge_status_recheck
will trigger an async update/check of all requested MRs for conflicts and mergeability. -
Wait some time and hope for recheck to be finished until then (there is no feedback or garantuee) -
Check known MRs for has_conflicts
and trigger rebase if necessary
In future it would be nice if Dependabot would recheck for updates as soon as a MR is closed/merged.
This way I always have just open-pull-requests-limit
MRs open, but as soon as I finish some MR a new one is created (if available / necessary).
This enables to crunch updates on a project until no more updates are available or I stop closing/merging MRs.