Identifying if merge queue branch is up-to-date with base branch #120203
Unanswered
rr-mark
asked this question in
Pull Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
tl;dr: If we are merging e.g.
feature/foo
intomain
in a merge queue, is it possible to identify thefeature/foo
branch (rather than `gh-readonly...) from within the merge queue job?Context:
We are using a merge queue, and would like to skip checks in the merge queue if the merging branch is up-to-date when it enters the queue (to avoid duplicating the checks which must have just happened to get it into the merge queue).
Since https://github.com/orgs/community/discussions/48792 (and the threads linked there) suggest there is no option to do this automatically, we have been investigating doing this manually.
We added the following step to our merge queue workflow:
this is intended to identify if
merge_group.head_ref
is up-to-date withmerge_queue.base_ref
, and to set askip_checks
flag that we can then use to skip checks if the branch is up-to-date.The problem is that
head_ref
is agh-readonly...
branch, and this branch is always up-to-date withbase_ref
, soskip_checks
is always set to true.If we could identify the original branch which is being merged (e.g.
feature/foo
rather thangh-readonly...
), I think this skip check would work, but it doesn't seem possible to get this information from within the merge queue. All of the members ofevent.merge_group
seem to relate togh-readonly...
rather thanfeature/foo
.Beta Was this translation helpful? Give feedback.
All reactions