Skip to content

Commit a6005c5

Browse files
Add GraphQlClient
1 parent 53edd66 commit a6005c5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

csharp/Storage/RemoteStorage/GitHubStorage.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Linq;
88
using System.Linq.Expressions;
99
using System.Threading.Tasks;
10+
using Octokit.Internal;
1011
using Platform.Threading;
1112
using File = Storage.Local.File;
1213

@@ -20,6 +21,9 @@ namespace Storage.Remote.GitHub
2021
/// </summary>
2122
public class GitHubStorage
2223
{
24+
ProductHeaderValue ProductInformation;
25+
Connection GraphQlClient;
26+
2327
/// <summary>
2428
/// <para>
2529
/// The client.
@@ -37,6 +41,7 @@ public class GitHubStorage
3741
public readonly string Owner;
3842

3943
public const int DependabotId = 49699333;
44+
4045

4146

4247
/// <summary>
@@ -69,11 +74,14 @@ public class GitHubStorage
6974
public GitHubStorage(string owner, string token, string name)
7075
{
7176
Owner = owner;
77+
var credentials = new Credentials(token);
7278
Client = new GitHubClient(new ProductHeaderValue(name))
7379
{
74-
Credentials = new Credentials(token)
80+
Credentials = credentials
7581
};
7682
MinimumInteractionInterval = new(0, 0, 0, 0, 1200);
83+
ProductInformation = new ProductHeaderValue("LinksPlatform", "1.0.0");
84+
GraphQlClient = new Connection(ProductInformation, credentialStore: new InMemoryCredentialStore(credentials));
7785
}
7886

7987
/// <summary>

0 commit comments

Comments
 (0)