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

Update octokit to 0.24.0. #1129

Merged
merged 3 commits into from
Aug 9, 2017
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
2 changes: 1 addition & 1 deletion src/GitHub.Api/SimpleApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async Task<bool> IsEnterpriseInternal()
return false;
#endif
var ret = await probe.ProbeAsync(HostAddress.WebUri);
return (ret == EnterpriseProbeResult.Ok);
return (ret == Services.EnterpriseProbeResult.Ok);
}
}
}
6 changes: 3 additions & 3 deletions src/GitHub.App/Api/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public IObservable<PullRequestReviewComment> CreatePullRequestReviewComment(
Guard.ArgumentNotEmptyString(path, nameof(path));

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

public IObservable<PullRequestReviewComment> CreatePullRequestReviewComment(
Expand All @@ -88,7 +88,7 @@ public IObservable<PullRequestReviewComment> CreatePullRequestReviewComment(
int inReplyTo)
{
var comment = new PullRequestReviewCommentReplyCreate(body, inReplyTo);
return gitHubClient.PullRequest.Comment.CreateReply(owner, name, number, comment);
return gitHubClient.PullRequest.ReviewComment.CreateReply(owner, name, number, comment);
}

public IObservable<Gist> CreateGist(NewGist newGist)
Expand Down Expand Up @@ -303,7 +303,7 @@ public IObservable<PullRequestReviewComment> GetPullRequestReviewComments(string
Guard.ArgumentNotEmptyString(owner, nameof(owner));
Guard.ArgumentNotEmptyString(name, nameof(name));

return gitHubClient.PullRequest.Comment.GetAll(owner, name, number);
return gitHubClient.PullRequest.ReviewComment.GetAll(owner, name, number);
}

public IObservable<PullRequest> GetPullRequestsForRepository(string owner, string name)
Expand Down
3 changes: 2 additions & 1 deletion src/UnitTests/GitHub.Api/SimpleApiClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using NSubstitute;
using Octokit;
using Xunit;
using EnterpriseProbeResult = GitHub.Services.EnterpriseProbeResult;

public class SimpleApiClientTests
{
Expand Down Expand Up @@ -240,6 +241,6 @@ private static Repository CreateRepository(int id, bool hasWiki)
return new Repository("", "", "", "", "", "", "",
id, new User(), "", "", "", "", "", false, false, 0, 0, "",
0, null, DateTimeOffset.Now, DateTimeOffset.Now, new RepositoryPermissions(), null, null, false,
hasWiki, false);
hasWiki, false, false, 0, 0, null, null, null);
}
}
10 changes: 6 additions & 4 deletions src/UnitTests/Helpers/TestBaseClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected static Repository CreateRepository(string owner, string name, string d
id, CreateOctokitUser(owner),
name, "fullname", "description", notCloneUrl, "c#", false, parent != null, 0, 0, "master",
0, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow, DateTimeOffset.UtcNow,
new RepositoryPermissions(), parent, null, true, false, false);
new RepositoryPermissions(), parent, null, true, false, false, false, 0, 0, null, null, null);
}

protected static PullRequest CreatePullRequest(User user, int id, ItemState state, string title,
Expand All @@ -64,13 +64,15 @@ protected static PullRequest CreatePullRequest(User user, int id, ItemState stat
false, false, 0, 0, "master",
0, null, createdAt, updatedAt,
null, null, null,
false, false, false);
return new PullRequest(uri, uri, uri, uri, uri, uri,
false, false, false,
false, 0, 0,
null, null, null);
return new PullRequest(0, uri, uri, uri, uri, uri, uri,
id, state, title, "", createdAt, updatedAt,
null, null,
new GitReference(uri.ToString(), "foo:bar", "bar", "123", user, repo),
new GitReference(uri.ToString(), "foo:baz", "baz", "123", user, repo),
user, null, false, null,
user, null, null, false, null,
commentCount, reviewCommentCount, 0, 0, 0, 0,
null, false);
}
Expand Down
2 changes: 1 addition & 1 deletion submodules/octokit.net
Submodule octokit.net updated 373 files