Skip to content

Commit da04bbe

Browse files
committed
Merge branch 'main' into cleanup-projects
2 parents b07e028 + e6b1e02 commit da04bbe

File tree

57 files changed

+928
-42
lines changed

Some content is hidden

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

57 files changed

+928
-42
lines changed

.github/workflows/add_to_octokit_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
continue-on-error: true
1414
steps:
15-
- uses: actions/add-to-project@v0.4.0
15+
- uses: actions/add-to-project@v0.5.0
1616
with:
1717
project-url: https://github.com/orgs/octokit/projects/10
1818
github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }}

.github/workflows/immediate-response.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,24 @@ on:
66
issues:
77
types:
88
- opened
9-
pull_request:
9+
pull_request_target:
1010
types:
1111
- opened
1212
jobs:
1313
respond-to-issue:
14+
if: ${{ github.actor != 'dependabot[bot]' && github.actor != 'renovate[bot]' && github.actor != 'githubactions[bot]' && github.actor != 'octokitbot' }}
1415
runs-on: ubuntu-latest
1516
steps:
1617
- name: Determine issue or PR number
1718
id: extract
1819
run: echo "NUMBER=${{ github.event.issue.number || github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
1920

2021
- name: Respond to issue or PR
21-
uses: peter-evans/create-or-update-comment@6534843181fc2aeb7f9f1cd3cd4a7b956cada2db
22+
uses: peter-evans/create-or-update-comment@v3
2223
with:
2324
issue-number: ${{ steps.extract.outputs.NUMBER }}
2425
body: >
2526
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday!
2627
We have a [process in place](https://github.com/octokit/.github/blob/main/community/prioritization_response.md#overview) for prioritizing and responding to your input.
2728
Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with `Status: Up for grabs`.
28-
You & others like you are the reason all of this works! So thank you & happy coding! 🚀
29+
You & others like you are the reason all of this works! So thank you & happy coding! 🚀

Octokit.GraphQL.Core.UnitTests/QueryBuilderTests.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,6 +1264,26 @@ public void Repository_PullRequest_CheckRun_Aliased_Id()
12641264
Assert.Equal(expected, actual, ignoreLineEndingDifferences: true);
12651265
}
12661266

1267+
[Fact]
1268+
public void Repository_Parent_ConditionalExpression()
1269+
{
1270+
var expected = @"query {
1271+
repository(owner: ""foo"", name: ""bar"") {
1272+
parent {
1273+
name
1274+
}
1275+
}
1276+
}";
1277+
1278+
var expression = new Query()
1279+
.Repository("foo", "bar")
1280+
.Select(repository => repository.Parent == null ? null : repository.Parent.Name);
1281+
1282+
var query = expression.Compile();
1283+
1284+
Assert.Equal(expected, query.ToString(2), ignoreLineEndingDifferences: true);
1285+
}
1286+
12671287
class TestModelObject
12681288
{
12691289
public string StringField1;

Octokit.GraphQL.Core/Core/Builders/QueryBuilder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Collections.ObjectModel;
44
using System.Linq;
@@ -204,7 +204,7 @@ protected override Expression VisitConditional(ConditionalExpression node)
204204
}
205205
else if (!falseNull)
206206
{
207-
ifTrue = Expression.Constant(null, ifFalse.Type);
207+
ifTrue = Expression.Constant(null, node.Type);
208208
}
209209

210210
if (!falseNull)
@@ -213,14 +213,14 @@ protected override Expression VisitConditional(ConditionalExpression node)
213213
}
214214
else if (!trueNull)
215215
{
216-
ifFalse = Expression.Constant(null, ifTrue.Type);
216+
ifFalse = Expression.Constant(null, node.Type);
217217
}
218218

219219
return Expression.Condition(
220220
test,
221221
ifTrue,
222222
ifFalse,
223-
!IsNullConstant(ifTrue) ? ifTrue.Type : ifFalse.Type);
223+
node.Type);
224224
}
225225

226226
protected override Expression VisitExtension(Expression node)

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

Octokit.GraphQL.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<package >
33
<metadata>
44
<id>Octokit.GraphQL</id>
5-
<version>0.2.1-beta</version>
5+
<version>0.3.0-beta</version>
66
<authors>GitHub</authors>
77
<owners>GitHub</owners>
88
<repository type="git" url="https://github.com/octokit/octokit.graphql.net" />
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+
}

0 commit comments

Comments
 (0)