Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 391bfc8

Browse files
authored
Merge pull request #1129 from github/fixes/1098-upgrade-octokit
Update octokit to 0.24.0.
2 parents 89b6763 + 92282a7 commit 391bfc8

File tree

5 files changed

+13
-10
lines changed

5 files changed

+13
-10
lines changed

src/GitHub.Api/SimpleApiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ async Task<bool> IsEnterpriseInternal()
133133
return false;
134134
#endif
135135
var ret = await probe.ProbeAsync(HostAddress.WebUri);
136-
return (ret == EnterpriseProbeResult.Ok);
136+
return (ret == Services.EnterpriseProbeResult.Ok);
137137
}
138138
}
139139
}

src/GitHub.App/Api/ApiClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public IObservable<PullRequestReviewComment> CreatePullRequestReviewComment(
7777
Guard.ArgumentNotEmptyString(path, nameof(path));
7878

7979
var comment = new PullRequestReviewCommentCreate(body, commitId, path, position);
80-
return gitHubClient.PullRequest.Comment.Create(owner, name, number, comment);
80+
return gitHubClient.PullRequest.ReviewComment.Create(owner, name, number, comment);
8181
}
8282

8383
public IObservable<PullRequestReviewComment> CreatePullRequestReviewComment(
@@ -88,7 +88,7 @@ public IObservable<PullRequestReviewComment> CreatePullRequestReviewComment(
8888
int inReplyTo)
8989
{
9090
var comment = new PullRequestReviewCommentReplyCreate(body, inReplyTo);
91-
return gitHubClient.PullRequest.Comment.CreateReply(owner, name, number, comment);
91+
return gitHubClient.PullRequest.ReviewComment.CreateReply(owner, name, number, comment);
9292
}
9393

9494
public IObservable<Gist> CreateGist(NewGist newGist)
@@ -303,7 +303,7 @@ public IObservable<PullRequestReviewComment> GetPullRequestReviewComments(string
303303
Guard.ArgumentNotEmptyString(owner, nameof(owner));
304304
Guard.ArgumentNotEmptyString(name, nameof(name));
305305

306-
return gitHubClient.PullRequest.Comment.GetAll(owner, name, number);
306+
return gitHubClient.PullRequest.ReviewComment.GetAll(owner, name, number);
307307
}
308308

309309
public IObservable<PullRequest> GetPullRequestsForRepository(string owner, string name)

src/UnitTests/GitHub.Api/SimpleApiClientTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using NSubstitute;
77
using Octokit;
88
using Xunit;
9+
using EnterpriseProbeResult = GitHub.Services.EnterpriseProbeResult;
910

1011
public class SimpleApiClientTests
1112
{
@@ -240,6 +241,6 @@ private static Repository CreateRepository(int id, bool hasWiki)
240241
return new Repository("", "", "", "", "", "", "",
241242
id, new User(), "", "", "", "", "", false, false, 0, 0, "",
242243
0, null, DateTimeOffset.Now, DateTimeOffset.Now, new RepositoryPermissions(), null, null, false,
243-
hasWiki, false);
244+
hasWiki, false, false, 0, 0, null, null, null);
244245
}
245246
}

src/UnitTests/Helpers/TestBaseClass.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected static Repository CreateRepository(string owner, string name, string d
5151
id, CreateOctokitUser(owner),
5252
name, "fullname", "description", notCloneUrl, "c#", false, parent != null, 0, 0, "master",
5353
0, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow,
54-
new RepositoryPermissions(), parent, null, true, false, false);
54+
new RepositoryPermissions(), parent, null, true, false, false, false, 0, 0, null, null, null);
5555
}
5656

5757
protected static PullRequest CreatePullRequest(User user, int id, ItemState state, string title,
@@ -64,13 +64,15 @@ protected static PullRequest CreatePullRequest(User user, int id, ItemState stat
6464
false, false, 0, 0, "master",
6565
0, null, createdAt, updatedAt,
6666
null, null, null,
67-
false, false, false);
68-
return new PullRequest(uri, uri, uri, uri, uri, uri,
67+
false, false, false,
68+
false, 0, 0,
69+
null, null, null);
70+
return new PullRequest(0, uri, uri, uri, uri, uri, uri,
6971
id, state, title, "", createdAt, updatedAt,
7072
null, null,
7173
new GitReference(uri.ToString(), "foo:bar", "bar", "123", user, repo),
7274
new GitReference(uri.ToString(), "foo:baz", "baz", "123", user, repo),
73-
user, null, false, null,
75+
user, null, null, false, null,
7476
commentCount, reviewCommentCount, 0, 0, 0, 0,
7577
null, false);
7678
}

submodules/octokit.net

Submodule octokit.net updated 373 files

0 commit comments

Comments
 (0)