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

Tweak User-Agent to refer to Octokit.net, not just Octokit #2447

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion Octokit.Tests/Http/ConnectionTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -749,6 +749,7 @@ public void CreatesConnectionWithBaseAddress()

Assert.Equal(new Uri("https://github.com/"), connection.BaseAddress);
Assert.StartsWith("OctokitTests (", connection.UserAgent);
Assert.Contains("Octokit.net", connection.UserAgent);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Octokit/Http/Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ internal static TwoFactorType ParseTwoFactorType(IResponse restResponse)

static string FormatUserAgent(ProductHeaderValue productInformation)
{
return string.Format(CultureInfo.InvariantCulture, "{0} ({1}; {2}; Octokit {3})",
return string.Format(CultureInfo.InvariantCulture, "{0} ({1}; {2}; Octokit.net {3})",
productInformation,
GetPlatformInformation(),
GetCultureInformation(),
Expand Down