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);
        }