Ejemplo n.º 1
0
        public List <IPullRequestInformation> GetPullRequests()
        {
            var api  = _plugin.GetPullRequestApi();
            var data = api.List(Owner, Name);

            if (data == null)
            {
                throw new InvalidOperationException("Could not fetch data!" + _plugin.GetLoggerData());
            }

            return((from el in data select(IPullRequestInformation) new GithubPullRequestInformation(Owner, Name, el, _plugin)).ToList());
        }
Ejemplo n.º 2
0
        public void Post(string data)
        {
            var issuesApi = _plugin.GetIssuesApi();

            if (!issuesApi.CommentOnIssue(_repositoryName, _owner, int.Parse(_id), data))
            {
                throw new InvalidOperationException("Failed to post comment. Log: " + _plugin.GetLoggerData());
            }
            _plugin.InvalidateCache();
        }