public GhUser(Author account) { AvatarUrl = account.AvatarUrl; HtmlUrl = account.HtmlUrl; Id = account.Id; Login = account.Login; Type = account.Type; Url = account.Url; }
public GitHubCommit(string url, string label, string @ref, string sha, User user, Repository repository, Author author, string commentsUrl, Commit commit, Author committer, string htmlUrl, GitHubCommitStats stats, IReadOnlyList<GitReference> parents, IReadOnlyList<GitHubCommitFile> files) : base(url, label, @ref, sha, user, repository) { Author = author; CommentsUrl = commentsUrl; Commit = commit; Committer = committer; HtmlUrl = htmlUrl; Stats = stats; Parents = parents; Files = files; }
public Merge(Author author, Author committer, Commit commit, IEnumerable<GitReference> parents, string commentsUrl, int commentCount, string htmlUrl) { Ensure.ArgumentNotNull(parents, "parents"); Author = author; Committer = committer; Commit = commit; Parents = new ReadOnlyCollection<GitReference>(parents.ToList()); CommentsUrl = commentsUrl; CommentCount = commentCount; HtmlUrl = htmlUrl; }
public ReleaseAsset(string url, int id, string name, string label, string state, string contentType, int size, int downloadCount, DateTimeOffset createdAt, DateTimeOffset updatedAt, string browserDownloadUrl, Author uploader) { Url = url; Id = id; Name = name; Label = label; State = state; ContentType = contentType; Size = size; DownloadCount = downloadCount; CreatedAt = createdAt; UpdatedAt = updatedAt; BrowserDownloadUrl = browserDownloadUrl; Uploader = uploader; }
public Release(string url, string htmlUrl, string assetsUrl, string uploadUrl, int id, string tagName, string targetCommitish, string name, string body, bool draft, bool prerelease, DateTimeOffset createdAt, DateTimeOffset? publishedAt, Author author, string tarballUrl, string zipballUrl, IReadOnlyList<ReleaseAsset> assets) { Url = url; HtmlUrl = htmlUrl; AssetsUrl = assetsUrl; UploadUrl = uploadUrl; Id = id; TagName = tagName; TargetCommitish = targetCommitish; Name = name; Body = body; Draft = draft; Prerelease = prerelease; CreatedAt = createdAt; PublishedAt = publishedAt; Author = author; TarballUrl = tarballUrl; ZipballUrl = zipballUrl; Assets = assets; }
public Contributor(Author author, int total, IReadOnlyList<WeeklyHash> weeks) { Author = author; Total = total; Weeks = weeks; }
public override IReadOnlyList <string> MergedQualifiers() { var parameters = new List <string>(); if (In != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "in:{0}", string.Join(",", In.Select(i => i.ToParameter())))); } if (Type != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "type:{0}", Type.ToParameter())); } if (Author.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "author:{0}", Author)); } if (Assignee.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "assignee:{0}", Assignee)); } if (Mentions.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "mentions:{0}", Mentions)); } if (Commenter.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "commenter:{0}", Commenter)); } if (Involves.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "involves:{0}", Involves)); } if (State.HasValue) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "state:{0}", State.Value.ToParameter())); } if (Labels != null) { parameters.AddRange(Labels.Select(label => string.Format(CultureInfo.InvariantCulture, "label:{0}", label))); } if (Language != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:{0}", Language)); } if (Created != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "created:{0}", Created)); } if (Updated != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "updated:{0}", Updated)); } if (Merged != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "merged:{0}", Merged)); } if (Comments != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "comments:{0}", Comments)); } if (User.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "user:{0}", User)); } 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))); } return(new ReadOnlyCollection <string>(parameters)); }
public override IReadOnlyList <string> MergedQualifiers() { var parameters = new List <string>(); if (Type != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "type:{0}", Type.ToParameter())); } if (In != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "in:{0}", string.Join(",", In.Select(i => i.ToParameter())))); } if (Author.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "author:{0}", Author)); } if (Assignee.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "assignee:{0}", Assignee)); } if (Mentions.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "mentions:{0}", Mentions)); } if (Commenter.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "commenter:{0}", Commenter)); } if (Involves.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "involves:{0}", Involves)); } if (Team.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "team:{0}", Team)); } if (State.HasValue) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "state:{0}", State.Value.ToParameter())); } if (Labels != null) { parameters.AddRange(Labels.Select(label => string.Format(CultureInfo.InvariantCulture, "label:{0}", label))); } if (No.HasValue) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "no:{0}", No.Value.ToParameter())); } if (Language != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:{0}", Language.ToParameter())); } if (Is != null) { parameters.AddRange(Is.Select(x => string.Format(CultureInfo.InvariantCulture, "is:{0}", x.ToParameter()))); } if (Created != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "created:{0}", Created)); } if (Updated != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "updated:{0}", Updated)); } if (Merged != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "merged:{0}", Merged)); } if (Status.HasValue) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "status:{0}", Status.Value.ToParameter())); } if (Head.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "head:{0}", Head)); } if (Base.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "base:{0}", Base)); } if (Closed != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "closed:{0}", Closed)); } if (Comments != null) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "comments:{0}", Comments)); } if (User.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "user:{0}", User)); } if (Repos.Any()) { var invalidFormatRepos = Repos.Where(x => !x.IsNameWithOwnerFormat()); if (invalidFormatRepos.Any()) { throw new RepositoryFormatException(invalidFormatRepos); } parameters.AddRange(Repos.Select(x => string.Format(CultureInfo.InvariantCulture, "repo:{0}", x))); } if (Milestone.IsNotBlank()) { parameters.Add(string.Format(CultureInfo.InvariantCulture, "milestone:\"{0}\"", Milestone.EscapeDoubleQuotes())); } // Add any exclusion parameters if (Exclusions != null) { parameters.AddRange(Exclusions.MergedQualifiers()); } return(new ReadOnlyCollection <string>(parameters)); }