Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A shortcut to create a GitHub PR to the parent branch #1727

Open
radeusgd opened this issue Sep 4, 2023 · 1 comment
Open

A shortcut to create a GitHub PR to the parent branch #1727

radeusgd opened this issue Sep 4, 2023 · 1 comment
Labels
externally requested feature New feature or request

Comments

@radeusgd
Copy link

radeusgd commented Sep 4, 2023

When using GitMachete with a deeper branch structure tree, I relatively often find myself wanting to create a PR from the current branch to its parent.

When launching GitHub after pushing the branch to the remote, I get a nice shortcut to create a PR from the recently pushed branch. But that shortcut defaults the base branch to be the default branch of the repo (develop / master / main / whatever it is). However, with the Machete workflow it usually makes sense to create the PR not to the default main branch but instead to the parent (as in the machete file structure).

I often use the GH shortcut and forget to change the PR base to the proper branch. It's also not that easy to find the parent branch in our repo when there are a lot of branches.

It would be a super cool addition to the Machete IntelliJ plugin if we had a button that allowed us to create a GH PR of the current branch to its parent, essentially opening the page https://github.com/<my org>/<my repo>/compare/<parent branch from Machete file>...<my current branch>.

@radeusgd radeusgd added externally requested feature New feature or request labels Sep 4, 2023
@PawelLipski
Copy link
Collaborator

GitHub support is long pending, #56 😅 but indeed we can implement just this functionality as the first step.

Problems to consider:

  • whether to rely on IntelliJ GitHub plugin (with its unstable APIs... rel Github PR integration #1293) or to use some Java client independent of GitHub
  • whether to display the Open GitHub PR button for the branches that already have a PR opened (how to detect whether it exists?)
  • (minor) detect whether the remote for the given repo corresponds to GitHub (easy for github.com, more problematic for GitHub Enterprise instances)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
externally requested feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants