From 620b1b9d8974a4d48eff36fdb28e0fd6c96a620f Mon Sep 17 00:00:00 2001 From: Ryan Gribble Date: Sun, 15 Jan 2017 16:03:10 +1000 Subject: [PATCH] Add missing fields to Repository class - HasPages, SubscribersCount, Size (#1473) * Add some missing fields to Repository object * Remove WatchersCount as due to historic reasons this is actually the starred count and not the watching count (which is in SubscribersCount). See #699 for more info --- Octokit/Models/Response/Repository.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Octokit/Models/Response/Repository.cs b/Octokit/Models/Response/Repository.cs index e0651605e4..d17ed63c85 100644 --- a/Octokit/Models/Response/Repository.cs +++ b/Octokit/Models/Response/Repository.cs @@ -14,7 +14,7 @@ public Repository(long id) Id = id; } - public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, string sshUrl, string svnUrl, string mirrorUrl, long id, User owner, string name, string fullName, string description, string homepage, string language, bool @private, bool fork, int forksCount, int stargazersCount, string defaultBranch, int openIssuesCount, DateTimeOffset? pushedAt, DateTimeOffset createdAt, DateTimeOffset updatedAt, RepositoryPermissions permissions, Repository parent, Repository source, bool hasIssues, bool hasWiki, bool hasDownloads, bool? allowRebaseMerge, bool? allowSquashMerge, bool? allowMergeCommit) + public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, string sshUrl, string svnUrl, string mirrorUrl, long id, User owner, string name, string fullName, string description, string homepage, string language, bool @private, bool fork, int forksCount, int stargazersCount, string defaultBranch, int openIssuesCount, DateTimeOffset? pushedAt, DateTimeOffset createdAt, DateTimeOffset updatedAt, RepositoryPermissions permissions, Repository parent, Repository source, bool hasIssues, bool hasWiki, bool hasDownloads, bool hasPages, int subscribersCount, long size, bool? allowRebaseMerge, bool? allowSquashMerge, bool? allowMergeCommit) { Url = url; HtmlUrl = htmlUrl; @@ -45,6 +45,9 @@ public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, st HasIssues = hasIssues; HasWiki = hasWiki; HasDownloads = hasDownloads; + HasPages = hasPages; + SubscribersCount = subscribersCount; + Size = size; AllowRebaseMerge = allowRebaseMerge; AllowSquashMerge = allowSquashMerge; AllowMergeCommit = allowMergeCommit; @@ -114,6 +117,12 @@ public Repository(string url, string htmlUrl, string cloneUrl, string gitUrl, st public bool? AllowMergeCommit { get; protected set; } + public bool HasPages { get; protected set; } + + public int SubscribersCount { get; protected set; } + + public long Size { get; protected set; } + internal string DebuggerDisplay { get