private Commit GetCommitInfo(Repository repo, string branch) { if (repo == null || string.IsNullOrWhiteSpace(branch)) { return(null); } var getCommit = new GetHeadCommitRequest(repo, branch, _settings); var result = getCommit.Send(); return(result.Success ? result.Result : null); }
private async Task <Commit> GetCommitInfoAsync(Repository repo, string branch) { if (repo == null || string.IsNullOrWhiteSpace(branch)) { return(null); } var getCommit = new GetHeadCommitRequest(repo, branch, _settings); var result = await getCommit.SendAsync().ConfigureAwait(false); return(result.Success ? result.Result : null); }