gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
13.25k stars 527 forks source link

Missing support for merge queues #4788

Open koppor opened 2 months ago

koppor commented 2 months ago

Version

0.12.16

Operating System

Windows

Distribution Method

msi (Windows)

Describe the issue

If a repository has merge queues enabled, GitButler should NOT show direct merge possibilities (to avoid the user accidently bypassing the merge queue)

How to reproduce

  1. Ensure that the branch protection rules enable the merge queue\ image
  2. Create a PR
  3. See that GitButler offers "Merge pull request"\ image

Expected behavior

GitButler should offer "Add to merge queue"

Relevant log output

No response

koppor commented 2 months ago

BTW, GitHub shows "Merging is blocked"

image

Byron commented 2 months ago

Thanks a lot for reporting!

@ndom91 might have some experience with this.

ndom91 commented 2 months ago

@koppor wuoldn't a PR be automatically added to the merge queue no matter which of those options you select and your repository has merge queues enabled?

koppor commented 2 months ago

@koppor wuoldn't a PR be automatically added to the merge queue no matter which of those options you select and your repository has merge queues enabled?

I need to click "Merge when ready" (because I did not activate auto merge. AFAIK this needs some extra work)

ndom91 commented 2 months ago

Okay gotcha. So some quick googling seems to indicate that GitHub hasn't added support to their REST API /Octokit for merge queues. They did however add support for them to their GraphQL API a few months ago (Source).

Do you happen to know any more about their API support for merge queues?

koppor commented 2 months ago

Unfortunately, I know barley anything about the API. Just using the Java library for interaction.... 😅 I checked the JavaDoc. Only one hit for Merge Queue (the event. Nothing relevant for the issue).

ndom91 commented 2 months ago

Okay yeah then unfortunately it doesn't seem like it's well supported by GitHub yet. But as soon as it is, I agree - it'd be nice for us to support those actions.