diff --git a/src/Octokit.GraphQL/Model/Issue.cs b/src/Octokit.GraphQL/Model/Issue.cs index d37fb806..714b731b 100644 --- a/src/Octokit.GraphQL/Model/Issue.cs +++ b/src/Octokit.GraphQL/Model/Issue.cs @@ -34,6 +34,24 @@ internal Issue(Expression expression) : base(expression) /// public IActor Author => this.CreateProperty(x => x.Author, Octokit.GraphQL.Model.Internal.StubIActor.Create); + /// + /// The parent entity of the issue. + /// + public Issue Parent => this.CreateProperty(x => x.Parent, Octokit.GraphQL.Model.Issue.Create); + + /// + /// A list of sub-issues associated with the Issue. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public IssueConnection SubIssues(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.SubIssues(first, after, last, before), Octokit.GraphQL.Model.IssueConnection.Create); + + /// + /// Summary of the state of an issue's sub-issues + /// + public SubIssuesSummary SubIssuesSummary => this.CreateProperty(x => x.SubIssuesSummary, Octokit.GraphQL.Model.SubIssuesSummary.Create); /// /// Author's association with the subject of the comment. /// diff --git a/src/Octokit.GraphQL/Model/SubIssuesSummary.cs b/src/Octokit.GraphQL/Model/SubIssuesSummary.cs new file mode 100644 index 00000000..8de4983c --- /dev/null +++ b/src/Octokit.GraphQL/Model/SubIssuesSummary.cs @@ -0,0 +1,35 @@ +using System.Linq.Expressions; +using Octokit.GraphQL.Core; + +namespace Octokit.GraphQL.Model +{ + /// + /// Summary of the state of an issue's sub-issues + /// + public class SubIssuesSummary : QueryableValue + { + internal SubIssuesSummary(Expression expression) : base(expression) + { + } + + /// + /// Count of completed sub-issues + /// + public int Completed { get; } + + /// + /// Percent of sub-issues which are completed + /// + public int percentCompleted { get; } + + /// + /// Count of total number of sub-issues + /// + public int Total { get; } + + internal static SubIssuesSummary Create(Expression expression) + { + return new SubIssuesSummary(expression); + } + } +} \ No newline at end of file