rebaseWhen=auto: disable auto rebasing when github merge queue is in use #31524
rarkins
started this conversation in
Suggest an Idea
Replies: 2 comments
-
Related: #31525 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Also something to consider is that there are not only BranchProtectionRules, but RepositoryRules too which can require MergeQueues |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Tell us more.
GitHub's Merge queue already takes care of testing PRs against the head commit of the base branch, so Renovate's automatic rebasing when automerge=true is not necessary.
Merge queue is part of "branch protection" via the UA. e.g. for our main branch:
Yet through the branch protections REST API (e.g.
https://api.github.com/repos/renovatebot/renovate/branches/main/protection
) it's not shown.I also can't find it listed in the REST API, e.g. https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28#get-branch-protection and it seems to be missing from GraphQL too: https://docs.github.com/en/graphql/reference/objects#branchprotectionrule
In GraphQL a PR does have a
mergeQueue
andisMergeQueueEnabled
fields though, although currently we don't fetch PR lists with GraphQL (we generally prefer REST as if-modified-since caching works).Here's a GraphQL query which seems to work:
Result:
The
id
returnsnull
if I test with a dummy branch or on a repo with no queues.It would be nice if we could get this info as part of the initRepo() graphql call but it seems like it can't be iterated on (i.e. "list all merge queues").
It seems then that this would result in one extra GraphQL API call per base branch per run, when rebaseWhen=auto. However we could potentially cache this information fairly aggressively as it's unlikely to change often and the impact of incorrectly cached info is low.
One other important point: we probably should know if a base branch has merge queue enabled (enforced) because Renovate-native automerging (including for branches) will then stop working.
Beta Was this translation helpful? Give feedback.
All reactions