Skip to content

Instantly share code, notes, and snippets.

@rafaeldalsenter
Created June 14, 2020 14:43
Show Gist options
  • Save rafaeldalsenter/b5391f75edfcea63d4a10bde898bac2c to your computer and use it in GitHub Desktop.
Save rafaeldalsenter/b5391f75edfcea63d4a10bde898bac2c to your computer and use it in GitHub Desktop.
public async Task<IList<PullRequestFileDto>> GetFilesFromPullRequest(long repositoryId, int pullRequest)
{
var result = await _githubClient.PullRequest.Files(repositoryId, pullRequest);
return result.Select(x => new PullRequestFileDto
{
Additions = x.Additions,
Deletions = x.Deletions,
Path = x.Patch,
FileName = x.FileName
}).ToList();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment