-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed as duplicate of#662
Closed as duplicate of#662
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Currently, any hostname ending with "github.com" (such as "slack-github.com") is incorrectly identified as the public GitHub host github.com.
The fix changes the public github hostname check from a suffix match to an exact match:
Before: strings.HasSuffix(u.Hostname(), "github.com")
After: u.Hostname() == "github.com"
This ensures that GHES hostnames like "slack-github.com" are correctly identified as GitHub Enterprise Server instances rather than being treated as the public GitHub.com.
Alternative approaches:
- I am not sure if public github hosts can have subdomains, but if needed a regex can be used to match host name patterns.
- Add extra optional parameter like
IS_GHESto explicitly indicate that this is a GHES instance.
Fixes #662
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.