First, "master" is a lazy assumption. Github supports a default branch,
which at the time of writing assumes "master". However, the default of
"master" may not be the case.
Instead, this change now checks with the repository: "What is your
default branch?" From that default branch Huborg creates pull
requests. The default_branch is an attribute on the repository
object (as per documentation).
Note, I discovered this when I ran Samvera's maintenance script to push
up our recent changes to Samvera's Contributing document. See
samvera/maintenance#44.
Octokit::NotFound: GET
https://api.github.com/repos/samvera-labs/sufia.io/git/refs/heads/master:
404 - Not Found // See:
https://developer.github.com/v3/git/refs/#get-a-reference
First, "master" is a lazy assumption. Github supports a default branch, which at the time of writing assumes "master". However, the default of "master" may not be the case.
Instead, this change now checks with the repository: "What is your default branch?" From that default branch Huborg creates pull requests. The default_branch is an attribute on the repository object (as per documentation).
Note, I discovered this when I ran Samvera's maintenance script to push up our recent changes to Samvera's Contributing document. See samvera/maintenance#44.