Get correct default branch from GitHub
NicolaiRuckel opened this issue · 1 comments
NicolaiRuckel commented
Recently, a lot of people switched from using main
as their default branch instead of master
. Right now, master
is hardcoded in pr
. With the go-github package it should be possible to get the correct default branch from GitHub (https://pkg.go.dev/github.com/google/go-github/v37/github#PushEventRepository.GetDefaultBranch).
jordanlewis commented
I think this is no longer an issue; I switched things to use the GitHub API since you got me excited about this project again :)