Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Settings.IsHostedServer value consistent with UrlUtil.IsHostedServer #3326

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/Runner.Common/ConfigurationStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,16 @@ public bool IsHostedServer
get
{
// Old runners do not have this property. Hosted runners likely don't have this property either.
return _isHostedServer ?? true;
if (_isHostedServer != null) {
return (bool)_isHostedServer;
}

// GHES JIT config API does not set this property either, so we need to auto-detect it.
if (GitHubUrl != null) {
return UrlUtil.IsHostedServer(new UriBuilder(GitHubUrl));
}

return true;
}

set
Expand Down