public PullRequestDiscussion(GithubPlugin plugin, GithubPullRequestInformation githubPullReqInfo, string owner, string repositoryName, string id)
        {
            _githubPullReqInfo = githubPullReqInfo;
            _plugin = plugin;
            _owner = owner;
            _repositoryName = repositoryName;
            _id = id;

            Load();
        }
Example #2
0
 public GithubHostedRemote(GithubHostedRemoteInformation info, GithubPlugin plugin)
 {
     _plugin = plugin;
     if (string.IsNullOrEmpty(info.NameAtGithub) || string.IsNullOrEmpty(info.Owner))
     {
         throw new ArgumentException("Neither NameAtGithub or Owner can be null");
     }
     Data = info.Owner + "/" + info.NameAtGithub;
     Name = info.Name;
 }
Example #3
0
        public PullRequestDiscussion(GithubPlugin plugin, GithubPullRequestInformation githubPullReqInfo, string owner, string repositoryName, string id)
        {
            _githubPullReqInfo = githubPullReqInfo;
            _plugin            = plugin;
            _owner             = owner;
            _repositoryName    = repositoryName;
            _id = id;

            TryLoad();
        }
Example #4
0
 public static GithubHostedRepository Convert(GithubPlugin p, GithubSharp.Core.Models.RepositoryFromSearch repo)
 {
     return(new GithubHostedRepository(p)
     {
         Owner = repo.Username,
         Name = repo.Name,
         Description = repo.Description,
         IsAFork = repo.Fork,
         Forks = repo.Forks,
         IsPrivate = false,
         Homepage = string.Format("https://github.com/{0}/{1}", repo.Username, repo.Name)
     });
 }
Example #5
0
 public static GithubHostedRepository Convert(GithubPlugin p, GithubSharp.Core.Models.Repository repo)
 {
     return(new GithubHostedRepository(p)
     {
         Owner = repo.Owner,
         Name = repo.Name,
         Description = repo.Description,
         IsAFork = repo.Fork,
         Forks = repo.Forks,
         IsPrivate = repo.Private,
         Homepage = repo.Homepage
     });
 }
Example #6
0
        internal GithubPullRequestInformation(string issueOwner, string repoName, PullRequest pullRequestDetails, GithubPlugin plugin)
        {
            _pullRequestDetails = pullRequestDetails;
            _plugin             = plugin;

            Owner          = pullRequestDetails.User.Login;
            Created        = pullRequestDetails.Created;
            Title          = pullRequestDetails.Title;
            Body           = pullRequestDetails.Body;
            Id             = pullRequestDetails.Number.ToString();
            IssueOwner     = issueOwner;
            RepositoryName = repoName;

            BaseRepo = GithubHostedRepository.Convert(_plugin, _pullRequestDetails.Base.Repository);
            BaseSha  = _pullRequestDetails.Base.Sha;
            BaseRef  = _pullRequestDetails.Base.Ref;
            HeadRepo = GithubHostedRepository.Convert(_plugin, _pullRequestDetails.Head.Repository);
            HeadSha  = _pullRequestDetails.Head.Sha;
            HeadRef  = _pullRequestDetails.Head.Ref;
        }
        internal GithubPullRequestInformation(string issueOwner, string repoName, PullRequest pullRequestDetails, GithubPlugin plugin)
        {
            _pullRequestDetails = pullRequestDetails;
            _plugin = plugin;

            Owner = pullRequestDetails.User.Login;
            Created = pullRequestDetails.Created;
            Title = pullRequestDetails.Title;
            Body = pullRequestDetails.Body;
            Id = pullRequestDetails.Number.ToString();
            IssueOwner = issueOwner;
            RepositoryName = repoName;

            BaseRepo = GithubHostedRepository.Convert(_plugin, _pullRequestDetails.Base.Repository);
            BaseSha = _pullRequestDetails.Base.Sha;
            BaseRef = _pullRequestDetails.Base.Ref;
            HeadRepo = GithubHostedRepository.Convert(_plugin, _pullRequestDetails.Head.Repository);
            HeadSha = _pullRequestDetails.Head.Sha;
            HeadRef = _pullRequestDetails.Head.Ref;
        }
Example #8
0
 public GithubPlugin()
 {
     if (_instance != null)
         throw new InvalidOperationException("Can not create this again...");
     _instance = this;
 }
Example #9
0
 public GithubHostedRepository(GithubPlugin githubPlugin)
 {
     _plugin = githubPlugin;
 }
 public GithubHostedRepository(GithubPlugin githubPlugin)
 {
     _plugin = githubPlugin;
 }
 public static GithubHostedRepository Convert(GithubPlugin p, GithubSharp.Core.Models.RepositoryFromSearch repo)
 {
     return new GithubHostedRepository(p)
     {
         Owner = repo.Username,
         Name = repo.Name,
         Description = repo.Description,
         IsAFork = repo.Fork,
         Forks = repo.Forks,
         IsPrivate = false,
         Homepage = string.Format("https://github.com/{0}/{1}", repo.Username, repo.Name)
     };
 }
 public static GithubHostedRepository Convert(GithubPlugin p, GithubSharp.Core.Models.Repository repo)
 {
     return new GithubHostedRepository(p)
     {
         Owner = repo.Owner,
         Name = repo.Name,
         Description = repo.Description,
         IsAFork = repo.Fork,
         Forks = repo.Forks,
         IsPrivate = repo.Private,
         Homepage = repo.Homepage
     };
 }