Skip to content

Commit

Permalink
Merge pull request #1922 from minrk/master-message
Browse files Browse the repository at this point in the history
GitHub: only show "master" branch message if master branch is requested
  • Loading branch information
consideRatio authored Jan 30, 2025
2 parents e8e336d + dd86179 commit 5a4bf55
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions binderhub/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,11 @@ async def get(self, provider_prefix, _unescaped_spec):
]

if provider.name == "GitHub":
error_message.append(
'GitHub recently changed default branches from "master" to "main".'
)

if provider.unresolved_ref in {"master", "main"}:
if provider.unresolved_ref == "master":
error_message.append(
'GitHub has changed default branches from "master" to "main".'
)
error_message.append(
"Tip: HEAD will always resolve to a repository's default branch."
)
Expand Down

0 comments on commit 5a4bf55

Please sign in to comment.