Skip to content

Commit 6aef9b1

Browse files
authored
Merge pull request #354 from mjcheetham/ghes-oauth
Mark GHES 3.2 as supporting GCM Core OAuth
2 parents a8760df + 61fd68f commit 6aef9b1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/shared/GitHub/GitHubConstants.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@ public static class GitHubConstants
2727
public const string GitHubOptHeader = "X-GitHub-OTP";
2828

2929
/// <summary>
30-
/// Minimum GitHub Enterprise version that supports OAuth authentication with GCM Core.
30+
/// Minimum GitHub Enterprise Server version that supports OAuth authentication with GCM Core.
3131
/// </summary>
32-
// TODO: update this with a real version number once the GCM OAuth application has been deployed to GHE
33-
public static readonly Version MinimumEnterpriseOAuthVersion = new Version("99.99.99");
32+
public static readonly Version MinimumOnPremOAuthVersion = new Version("3.2");
3433

3534
/// <summary>
3635
/// The version string returned from the meta API endpoint for GitHub AE instances.

src/shared/GitHub/GitHubHostProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ internal async Task<AuthenticationModes> GetSupportedAuthenticationModesAsync(Ur
269269
// Assume all GHAE instances have the GCM OAuth application deployed
270270
modes |= AuthenticationModes.OAuth;
271271
}
272-
else if (Version.TryParse(metaInfo.InstalledVersion, out var version) && version >= GitHubConstants.MinimumEnterpriseOAuthVersion)
272+
else if (Version.TryParse(metaInfo.InstalledVersion, out var version) && version >= GitHubConstants.MinimumOnPremOAuthVersion)
273273
{
274274
// Only GHES versions beyond the minimum version have the GCM OAuth application deployed
275275
modes |= AuthenticationModes.OAuth;

0 commit comments

Comments
 (0)