Ejemplo n.º 1
0
        public PullRequestDiscussion(GithubPlugin plugin, GithubPullRequestInformation githubPullReqInfo, string owner, string repositoryName, string id)
        {
            _githubPullReqInfo = githubPullReqInfo;
            _plugin = plugin;
            _owner = owner;
            _repositoryName = repositoryName;
            _id = id;

            Load();
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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)
     });
 }
Ejemplo n.º 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
     });
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 8
0
 public GithubPlugin()
 {
     if (_instance != null)
         throw new InvalidOperationException("Can not create this again...");
     _instance = this;
 }
Ejemplo n.º 9
0
 public GithubHostedRepository(GithubPlugin githubPlugin)
 {
     _plugin = githubPlugin;
 }
Ejemplo n.º 10
0
 public GithubHostedRepository(GithubPlugin githubPlugin)
 {
     _plugin = githubPlugin;
 }
Ejemplo n.º 11
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)
     };
 }
Ejemplo n.º 12
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
     };
 }