Exemplo n.º 1
0
 public GitTag(string url, string label, string @ref, string sha, User user, Repository repository, string tag, string message, Committer tagger, TagObject objectVar)
     : base(url, label, @ref, sha, user, repository)
 {
     Tag     = tag;
     Message = message;
     Tagger  = tagger;
     Object  = objectVar;
 }
Exemplo n.º 2
0
 public GitTag(string url, string label, string @ref, string sha, User user, Repository repository, string tag, string message, Committer tagger, TagObject objectVar)
     : base(url, label, @ref, sha, user, repository)
 {
     Tag = tag;
     Message = message;
     Tagger = tagger;
     Object = objectVar;
 }
Exemplo n.º 3
0
 public GitTag(string nodeId, string url, string label, string @ref, string sha, User user, Repository repository, string tag, string message, Committer tagger, TagObject @object, Verification verification)
     : base(nodeId, url, label, @ref, sha, user, repository)
 {
     Tag          = tag;
     Message      = message;
     Tagger       = tagger;
     Object       = @object;
     Verification = verification;
 }
Exemplo n.º 4
0
        public Commit(string url, string label, string @ref, string sha, User user, Repository repository, string message, Committer author, Committer committer, GitReference tree, IEnumerable <GitReference> parents, int commentCount)
            : base(url, label, @ref, sha, user, repository)
        {
            Ensure.ArgumentNotNull(parents, nameof(parents));

            Message      = message;
            Author       = author;
            Committer    = committer;
            Tree         = tree;
            Parents      = new ReadOnlyCollection <GitReference>(parents.ToList());
            CommentCount = commentCount;
        }
Exemplo n.º 5
0
        public Commit(string url, string label, string @ref, string sha, User user, Repository repository, string message, Committer author, Committer committer, GitReference tree, IEnumerable<GitReference> parents, int commentCount)
            : base(url, label, @ref, sha, user, repository)
        {
            Ensure.ArgumentNotNull(parents, "parents");

            Message = message;
            Author = author;
            Committer = committer;
            Tree = tree;
            Parents = new ReadOnlyCollection<GitReference>(parents.ToList());
            CommentCount = commentCount;
        }
Exemplo n.º 6
0
        public PullRequestCommit(Committer author, Uri commentsUrl, Commit commit, Committer committer, Uri htmlUrl, IEnumerable<GitReference> parents, string sha, Uri url)
        {
            Ensure.ArgumentNotNull(parents, "parents");

            Author = author;
            CommentsUrl = commentsUrl;
            Commit = commit;
            Committer = committer;
            HtmlUrl = htmlUrl;
            Parents = new ReadOnlyCollection<GitReference>(parents.ToList());
            Sha = sha;
            Url = url;
        }
        public PullRequestCommit(Committer author, Uri commentsUrl, Commit commit, Committer committer, Uri htmlUrl, IEnumerable <GitReference> parents, string sha, Uri url)
        {
            Ensure.ArgumentNotNull(parents, "parents");

            Author      = author;
            CommentsUrl = commentsUrl;
            Commit      = commit;
            Committer   = committer;
            HtmlUrl     = htmlUrl;
            Parents     = new ReadOnlyCollection <GitReference>(parents.ToList());
            Sha         = sha;
            Url         = url;
        }
        public PullRequestCommit(string nodeId, Committer author, string commentsUrl, Commit commit, Committer committer, string htmlUrl, IEnumerable <GitReference> parents, string sha, string url)
        {
            Ensure.ArgumentNotNull(parents, nameof(parents));

            NodeId      = nodeId;
            Author      = author;
            CommentsUrl = commentsUrl;
            Commit      = commit;
            Committer   = committer;
            HtmlUrl     = htmlUrl;
            Parents     = new ReadOnlyCollection <GitReference>(parents.ToList());
            Sha         = sha;
            Url         = url;
        }
Exemplo n.º 9
0
        public override IReadOnlyList <string> MergedQualifiers()
        {
            var parameters = new List <string>();

            if (User.IsNotBlank())
            {
                parameters.Add($"user:{User}");
            }

            if (Author.IsNotBlank())
            {
                parameters.Add($"author:{Author}");
            }

            if (Committer.IsNotBlank())
            {
                parameters.Add($"committer:{Committer}");
            }

            if (AuthorName.IsNotBlank())
            {
                parameters.Add($"author-name:{AuthorName}");
            }

            if (CommitterName.IsNotBlank())
            {
                parameters.Add($"committer-name:{CommitterName}");
            }

            if (AuthorEmail.IsNotBlank())
            {
                parameters.Add($"author-email:{AuthorEmail}");
            }

            if (CommitterEmail.IsNotBlank())
            {
                parameters.Add($"committer-email:{CommitterEmail}");
            }

            if (AuthoredDate.IsNotDefault())
            {
                parameters.Add($"author-date:{QueryDateTime(AuthoredDate)}");
            }
            if (CommittedDate.IsNotDefault())
            {
                parameters.Add($"committer-date:{QueryDateTime(CommittedDate)}");
            }

            if (IsMerge.IsNotNull())
            {
                parameters.Add($"merge:{IsMerge.ToString()}");
            }

            if (CommitHash.IsNotBlank())
            {
                parameters.Add($"hash:{CommitHash}");
            }

            if (Parent.IsNotBlank())
            {
                parameters.Add($"parent:{Parent}");
            }

            if (Tree.IsNotBlank())
            {
                parameters.Add($"tree:{Tree}");
            }

            if (Repos.Any())
            {
                var invalidFormatRepos = Repos.Where(x => !x.IsNameWithOwnerFormat());
                if (invalidFormatRepos.Any())
                {
                    throw new RepositoryFormatException(invalidFormatRepos);
                }

                parameters.Add(
                    string.Join("+", Repos.Select(x => "repo:" + x)));
            }

            if (Organization.IsNotBlank())
            {
                parameters.Add($"org:{Organization}");
            }

            return(new ReadOnlyCollection <string>(parameters));
        }