modularml / stack-pr

A tool for working with stacked PRs on github.
Other
260 stars 7 forks source link

Feature Request: Auto detect default branch #24

Open koliyo opened 1 week ago

koliyo commented 1 week ago

The default branch is currently assumed to be main. I am aware of the flags to override the branches, but it would also be helpful if the tool automatically could detect the default branch.

See eg https://stackoverflow.com/questions/28666357/how-to-get-default-git-branch

I.e. using the result from git symbolic-ref --short refs/remotes/origin/HEAD

ZolotukhinM commented 1 week ago

Oh, that's neat, thanks!

ZolotukhinM commented 1 week ago

Pls feel free to submit a PR if you're up to it (but it's ok if not, I eventually can get to that too :) )