Identifying if merge queue branch is up-to-date with base branch #120203
Replies: 1 comment
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
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