diff --git a/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs b/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs index ef70557531..9afd3ae656 100644 --- a/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/PullRequestsClientTests.cs @@ -870,10 +870,10 @@ public async Task CanBrowseFiles() { var expectedFiles = new List { - new PullRequestFile(null, "Octokit.Tests.Integration/Clients/ReferencesClientTests.cs", null, 8, 3, 11, null, null, null, null), - new PullRequestFile(null, "Octokit/Clients/ApiPagination.cs", null, 21, 6, 27, null, null, null, null), - new PullRequestFile(null, "Octokit/Helpers/IApiPagination.cs", null, 1, 1, 2, null, null, null, null), - new PullRequestFile(null, "Octokit/Http/ApiConnection.cs", null, 1, 1, 2, null, null, null, null) + new PullRequestFile(null, "Octokit.Tests.Integration/Clients/ReferencesClientTests.cs", null, 8, 3, 11, null, null, null, null, null), + new PullRequestFile(null, "Octokit/Clients/ApiPagination.cs", null, 21, 6, 27, null, null, null, null, null), + new PullRequestFile(null, "Octokit/Helpers/IApiPagination.cs", null, 1, 1, 2, null, null, null, null, null), + new PullRequestFile(null, "Octokit/Http/ApiConnection.cs", null, 1, 1, 2, null, null, null, null, null) }; var result = await _fixture.Files("octokit", "octokit.net", 288); @@ -894,10 +894,10 @@ public async Task CanBrowseFilesWithRepositoryId() { var expectedFiles = new List { - new PullRequestFile(null, "Octokit.Tests.Integration/Clients/ReferencesClientTests.cs", null, 8, 3, 11, null, null, null, null), - new PullRequestFile(null, "Octokit/Clients/ApiPagination.cs", null, 21, 6, 27, null, null, null, null), - new PullRequestFile(null, "Octokit/Helpers/IApiPagination.cs", null, 1, 1, 2, null, null, null, null), - new PullRequestFile(null, "Octokit/Http/ApiConnection.cs", null, 1, 1, 2, null, null, null, null) + new PullRequestFile(null, "Octokit.Tests.Integration/Clients/ReferencesClientTests.cs", null, 8, 3, 11, null, null, null, null, null), + new PullRequestFile(null, "Octokit/Clients/ApiPagination.cs", null, 21, 6, 27, null, null, null, null, null), + new PullRequestFile(null, "Octokit/Helpers/IApiPagination.cs", null, 1, 1, 2, null, null, null, null, null), + new PullRequestFile(null, "Octokit/Http/ApiConnection.cs", null, 1, 1, 2, null, null, null, null, null) }; var result = await _fixture.Files(7528679, 288); diff --git a/Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs b/Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs index 843d7fb739..8ca0e56061 100644 --- a/Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs +++ b/Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs @@ -693,7 +693,7 @@ public class TheFilesMethod [Fact] public async Task FetchesAllFilesForPullRequest() { - var file = new PullRequestFile(null, null, null, 0, 0, 0, null, null, null, null); + var file = new PullRequestFile(null, null, null, 0, 0, 0, null, null, null, null, null); var expectedUrl = "repos/fake/repo/pulls/42/files"; var gitHubClient = Substitute.For(); var connection = Substitute.For(); @@ -717,7 +717,7 @@ public async Task FetchesAllFilesForPullRequest() [Fact] public async Task FetchesAllFilesForPullRequestWithRepositoryId() { - var file = new PullRequestFile(null, null, null, 0, 0, 0, null, null, null, null); + var file = new PullRequestFile(null, null, null, 0, 0, 0, null, null, null, null, null); var expectedUrl = "repositories/1/pulls/42/files"; var gitHubClient = Substitute.For(); var connection = Substitute.For(); diff --git a/Octokit/Models/Response/PullRequestFile.cs b/Octokit/Models/Response/PullRequestFile.cs index fa84048533..362dfe0adf 100644 --- a/Octokit/Models/Response/PullRequestFile.cs +++ b/Octokit/Models/Response/PullRequestFile.cs @@ -9,7 +9,7 @@ public class PullRequestFile { public PullRequestFile() { } - public PullRequestFile(string sha, string fileName, string status, int additions, int deletions, int changes, string blobUrl, string rawUrl, string contentsUrl, string patch) + public PullRequestFile(string sha, string fileName, string status, int additions, int deletions, int changes, string blobUrl, string rawUrl, string contentsUrl, string patch, string previousFileName) { Sha = sha; FileName = fileName; @@ -21,6 +21,7 @@ public PullRequestFile(string sha, string fileName, string status, int additions RawUrl = rawUrl; ContentsUrl = contentsUrl; Patch = patch; + PreviousFileName = previousFileName; } public string Sha { get; protected set; } @@ -34,6 +35,8 @@ public PullRequestFile(string sha, string fileName, string status, int additions public string RawUrl { get; protected set; } public string ContentsUrl { get; protected set; } public string Patch { get; protected set; } + [Parameter(Key = "previous_filename")] + public string PreviousFileName { get; protected set; } internal string DebuggerDisplay {