Skip to content

Commit eef45a9

Browse files
authored
fix: generates models and fixes the tests
2 parents 3e6efaa + 368c325 commit eef45a9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+898
-33
lines changed

Octokit.GraphQL.UnitTests/ExpressionRewiterTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public void Repository_Details_With_Viewer()
129129
{
130130
var query = new Query()
131131
.Select(x => x.RepositoryOwner("foo")
132-
.Repositories(30, null, null, null, null, null, null, null, null, null, null)
132+
.Repositories(30, null, null, null, null, null, null, null, null, null, null, null)
133133
.Edges
134134
.Select(y => y.Node)
135135
.Select(z => new

Octokit.GraphQL.UnitTests/QueryBuilderTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public void RepositoryOwner_Repositories_Query_Viewer()
120120
var expression = new Query()
121121
.Select(root => root
122122
.RepositoryOwner("foo")
123-
.Repositories(30, null, null, null, null, null, null, null, null, null, null)
123+
.Repositories(30, null, null, null, null, null, null, null, null, null, null, null)
124124
.Edges.Select(x => x.Node)
125125
.Select(x => new
126126
{
@@ -221,7 +221,7 @@ public void Repository_Details_With_Viewer()
221221

222222
var expression = new Query()
223223
.Select(x => x.RepositoryOwner("foo")
224-
.Repositories(30, null, null, null, null, null, null, null, null, null, null)
224+
.Repositories(30, null, null, null, null, null, null, null, null, null, null, null)
225225
.Edges
226226
.Select(y => y.Node)
227227
.Select(y => new
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
6+
/// <summary>
7+
/// Autogenerated input type of AbortRepositoryMigration
8+
/// </summary>
9+
public class AbortRepositoryMigrationInput
10+
{
11+
/// <summary>
12+
/// The ID of the migration to be aborted.
13+
/// </summary>
14+
public ID MigrationId { get; set; }
15+
16+
/// <summary>
17+
/// A unique identifier for the client performing the mutation.
18+
/// </summary>
19+
public string ClientMutationId { get; set; }
20+
}
21+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq.Expressions;
6+
using Octokit.GraphQL.Core;
7+
using Octokit.GraphQL.Core.Builders;
8+
9+
/// <summary>
10+
/// Autogenerated return type of AbortRepositoryMigration
11+
/// </summary>
12+
public class AbortRepositoryMigrationPayload : QueryableValue<AbortRepositoryMigrationPayload>
13+
{
14+
internal AbortRepositoryMigrationPayload(Expression expression) : base(expression)
15+
{
16+
}
17+
18+
/// <summary>
19+
/// A unique identifier for the client performing the mutation.
20+
/// </summary>
21+
public string ClientMutationId { get; }
22+
23+
/// <summary>
24+
/// Did the operation succeed?
25+
/// </summary>
26+
public bool? Success { get; }
27+
28+
internal static AbortRepositoryMigrationPayload Create(Expression expression)
29+
{
30+
return new AbortRepositoryMigrationPayload(expression);
31+
}
32+
}
33+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
6+
/// <summary>
7+
/// Autogenerated input type of AddPullRequestReviewThreadReply
8+
/// </summary>
9+
public class AddPullRequestReviewThreadReplyInput
10+
{
11+
/// <summary>
12+
/// The Node ID of the pending review to which the reply will belong.
13+
/// </summary>
14+
public ID? PullRequestReviewId { get; set; }
15+
16+
/// <summary>
17+
/// The Node ID of the thread to which this reply is being written.
18+
/// </summary>
19+
public ID PullRequestReviewThreadId { get; set; }
20+
21+
/// <summary>
22+
/// The text of the reply.
23+
/// </summary>
24+
public string Body { get; set; }
25+
26+
/// <summary>
27+
/// A unique identifier for the client performing the mutation.
28+
/// </summary>
29+
public string ClientMutationId { get; set; }
30+
}
31+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq.Expressions;
6+
using Octokit.GraphQL.Core;
7+
using Octokit.GraphQL.Core.Builders;
8+
9+
/// <summary>
10+
/// Autogenerated return type of AddPullRequestReviewThreadReply
11+
/// </summary>
12+
public class AddPullRequestReviewThreadReplyPayload : QueryableValue<AddPullRequestReviewThreadReplyPayload>
13+
{
14+
internal AddPullRequestReviewThreadReplyPayload(Expression expression) : base(expression)
15+
{
16+
}
17+
18+
/// <summary>
19+
/// A unique identifier for the client performing the mutation.
20+
/// </summary>
21+
public string ClientMutationId { get; }
22+
23+
/// <summary>
24+
/// The newly created reply.
25+
/// </summary>
26+
public PullRequestReviewComment Comment => this.CreateProperty(x => x.Comment, Octokit.GraphQL.Model.PullRequestReviewComment.Create);
27+
28+
internal static AddPullRequestReviewThreadReplyPayload Create(Expression expression)
29+
{
30+
return new AddPullRequestReviewThreadReplyPayload(expression);
31+
}
32+
}
33+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq.Expressions;
6+
using Octokit.GraphQL.Core;
7+
using Octokit.GraphQL.Core.Builders;
8+
9+
/// <summary>
10+
/// The Contributing Guidelines for a repository.
11+
/// </summary>
12+
public class ContributingGuidelines : QueryableValue<ContributingGuidelines>
13+
{
14+
internal ContributingGuidelines(Expression expression) : base(expression)
15+
{
16+
}
17+
18+
/// <summary>
19+
/// The body of the Contributing Guidelines.
20+
/// </summary>
21+
public string Body { get; }
22+
23+
/// <summary>
24+
/// The HTTP path for the Contributing Guidelines.
25+
/// </summary>
26+
public string ResourcePath { get; }
27+
28+
/// <summary>
29+
/// The HTTP URL for the Contributing Guidelines.
30+
/// </summary>
31+
public string Url { get; }
32+
33+
internal static ContributingGuidelines Create(Expression expression)
34+
{
35+
return new ContributingGuidelines(expression);
36+
}
37+
}
38+
}

Octokit.GraphQL/Model/CreateLinkedBranchPayload.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ internal CreateLinkedBranchPayload(Expression expression) : base(expression)
2020
/// </summary>
2121
public string ClientMutationId { get; }
2222

23+
/// <summary>
24+
/// The issue that was linked to.
25+
/// </summary>
26+
public Issue Issue => this.CreateProperty(x => x.Issue, Octokit.GraphQL.Model.Issue.Create);
27+
2328
/// <summary>
2429
/// The new branch issue reference.
2530
/// </summary>

Octokit.GraphQL/Model/DeploymentProtectionRule.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ internal DeploymentProtectionRule(Expression expression) : base(expression)
2020
/// </summary>
2121
public int? DatabaseId { get; }
2222

23+
/// <summary>
24+
/// Whether deployments to this environment can be approved by the user who created the deployment.
25+
/// </summary>
26+
public bool? PreventSelfReview { get; }
27+
2328
/// <summary>
2429
/// The teams or users that can review the deployment
2530
/// </summary>

Octokit.GraphQL/Model/Discussion.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ internal Discussion(Expression expression) : base(expression)
111111
/// </summary>
112112
public bool IncludesCreatedEdit { get; }
113113

114+
/// <summary>
115+
/// Only return answered/unanswered discussions
116+
/// </summary>
117+
public bool? IsAnswered { get; }
118+
114119
/// <summary>
115120
/// A list of labels associated with the object.
116121
/// </summary>

0 commit comments

Comments
 (0)