Skip to content

Commit d8bcb3e

Browse files
authored
Merge branch 'master' into master
2 parents f7d5dab + a0ae8ec commit d8bcb3e

Some content is hidden

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

50 files changed

+1232
-18
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build, test and publish
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
env:
10+
config: Release
11+
12+
jobs:
13+
build-test-publish:
14+
runs-on: windows-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Setup .NET Core and GitHub Packages
18+
uses: actions/setup-dotnet@v1
19+
with:
20+
dotnet-version: 3.1.101
21+
source-url: https://nuget.pkg.github.com/octokit/index.json
22+
env:
23+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
24+
- name: Setup NuGet
25+
uses: nuget/setup-nuget@v1
26+
with:
27+
nuget-version: '5.x'
28+
29+
- name: Build using .NET Core
30+
run: dotnet build Octokit.GraphQL.sln -c ${{ env.config }}
31+
32+
- name: Run Octokit.GraphQL.UnitTests
33+
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.UnitTests\Octokit.GraphQL.UnitTests.csproj
34+
- name: Run Octokit.GraphQL.Core.UnitTests
35+
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.UnitTests\Octokit.GraphQL.Core.UnitTests.csproj
36+
- name: Run Octokit.GraphQL.Core.Generation.UnitTests
37+
run: dotnet test -c ${{ env.config }} --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[Octokit.GraphQL]Octokit.GraphQL.*" .\Octokit.GraphQL.Core.Generation.UnitTests\Octokit.GraphQL.Core.Generation.UnitTests.csproj
38+
39+
- name: Create NuGet package
40+
run: nuget pack
41+
42+
- name: Publish to GitHub Packages
43+
if: github.ref == 'refs/heads/master'
44+
run: dotnet nuget push *.nupkg

Octokit.GraphQL.Core.Generation/InterfaceGenerator.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ private static string GenerateField(FieldModel field)
7575
GenerateListMethod(field, reduced) :
7676
GenerateListField(field, reduced);
7777
}
78-
else if (reduced.Kind == TypeKind.Union)
79-
{
80-
// HACK: Returning IEnumerable<object> for unions for now until we decide how to handle them.
81-
reduced = TypeModel.List(reduced);
82-
result += method ?
83-
GenerateListMethod(field, reduced) :
84-
GenerateListField(field, reduced);
85-
}
8678
else
8779
{
8880
result += method ?

Octokit.GraphQL.nuspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
<package >
33
<metadata>
44
<id>Octokit.GraphQL</id>
5-
<version>0.1.4-beta</version>
5+
<version>0.1.5-beta</version>
66
<authors>GitHub</authors>
77
<owners>GitHub</owners>
8+
<repository type="git" url="https://github.com/octokit/octokit.graphql.net" />
89
<licenseUrl>https://github.com/grokys/octokit.graphql/blob/master/LICENSE.txt</licenseUrl>
910
<projectUrl>https://github.com/grokys/octokit.graphql</projectUrl>
1011
<iconUrl>https://f.cloud.github.com/assets/19977/1441274/160fba8c-41a9-11e3-831d-61d88fa886f4.png</iconUrl>
@@ -22,4 +23,4 @@
2223
<file src="Octokit.GraphQL\bin\Release\netstandard1.1\Octokit.GraphQL.Core.dll" target="lib\netstandard1.1"/>
2324
<file src="Octokit.GraphQL\bin\Release\netstandard1.1\Octokit.GraphQL.Core.xml" target="lib\netstandard1.1"/>
2425
</files>
25-
</package>
26+
</package>

Octokit.GraphQL/Model/AuditEntry.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public interface IAuditEntry : IQueryableValue<IAuditEntry>, IQueryableInterface
2121
/// <summary>
2222
/// The user who initiated the action
2323
/// </summary>
24-
IQueryableList<AuditEntryActor> Actor { get; }
24+
AuditEntryActor Actor { get; }
2525

2626
/// <summary>
2727
/// The IP address of the actor
@@ -96,7 +96,7 @@ internal StubIAuditEntry(Expression expression) : base(expression)
9696

9797
public string Action { get; }
9898

99-
public IQueryableList<AuditEntryActor> Actor => this.CreateProperty(x => x.Actor);
99+
public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create);
100100

101101
public string ActorIp { get; }
102102

Octokit.GraphQL/Model/CheckConclusionState.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ public enum CheckConclusionState
4848
Neutral,
4949

5050
/// <summary>
51-
/// The check suite or run was skipped. For internal use only.
51+
/// The check suite or run was skipped by GitHub. Only GitHub can use this conclusion.
5252
/// </summary>
5353
[EnumMember(Value = "SKIPPED")]
5454
Skipped,
5555

5656
/// <summary>
57-
/// The check suite or run was marked stale. For internal use only.
57+
/// The check suite or run was marked stale by GitHub. Only GitHub can use this conclusion.
5858
/// </summary>
5959
[EnumMember(Value = "STALE")]
6060
Stale,

Octokit.GraphQL/Model/Commit.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,20 @@ internal Commit(Expression expression) : base(expression)
200200
/// </summary>
201201
public Status Status => this.CreateProperty(x => x.Status, Octokit.GraphQL.Model.Status.Create);
202202

203+
/// <summary>
204+
/// Check and Status rollup information for this commit.
205+
/// </summary>
206+
public StatusCheckRollup StatusCheckRollup => this.CreateProperty(x => x.StatusCheckRollup, Octokit.GraphQL.Model.StatusCheckRollup.Create);
207+
208+
/// <summary>
209+
/// Returns a list of all submodules in this repository as of this Commit parsed from the .gitmodules file.
210+
/// </summary>
211+
/// <param name="first">Returns the first _n_ elements from the list.</param>
212+
/// <param name="after">Returns the elements in the list that come after the specified cursor.</param>
213+
/// <param name="last">Returns the last _n_ elements from the list.</param>
214+
/// <param name="before">Returns the elements in the list that come before the specified cursor.</param>
215+
public SubmoduleConnection Submodules(Arg<int>? first = null, Arg<string>? after = null, Arg<int>? last = null, Arg<string>? before = null) => this.CreateMethodCall(x => x.Submodules(first, after, last, before), Octokit.GraphQL.Model.SubmoduleConnection.Create);
216+
203217
/// <summary>
204218
/// Returns a URL to download a tarball archive for a repository.
205219
/// Note: For private repositories, these links are temporary and expire after five minutes.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
namespace Octokit.GraphQL.Model
2+
{
3+
using System;
4+
using System.Collections.Generic;
5+
6+
/// <summary>
7+
/// Autogenerated input type of CreateIpAllowListEntry
8+
/// </summary>
9+
public class CreateIpAllowListEntryInput
10+
{
11+
/// <summary>
12+
/// The ID of the owner for which to create the new IP allow list entry.
13+
/// </summary>
14+
public ID OwnerId { get; set; }
15+
16+
/// <summary>
17+
/// An IP address or range of addresses in CIDR notation.
18+
/// </summary>
19+
public string AllowListValue { get; set; }
20+
21+
/// <summary>
22+
/// An optional name for the IP allow list entry.
23+
/// </summary>
24+
public string Name { get; set; }
25+
26+
/// <summary>
27+
/// Whether the IP allow list entry is active when an IP allow list is enabled.
28+
/// </summary>
29+
public bool IsActive { get; set; }
30+
31+
/// <summary>
32+
/// A unique identifier for the client performing the mutation.
33+
/// </summary>
34+
public string ClientMutationId { get; set; }
35+
}
36+
}
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 CreateIpAllowListEntry
11+
/// </summary>
12+
public class CreateIpAllowListEntryPayload : QueryableValue<CreateIpAllowListEntryPayload>
13+
{
14+
internal CreateIpAllowListEntryPayload(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 IP allow list entry that was created.
25+
/// </summary>
26+
public IpAllowListEntry IpAllowListEntry => this.CreateProperty(x => x.IpAllowListEntry, Octokit.GraphQL.Model.IpAllowListEntry.Create);
27+
28+
internal static CreateIpAllowListEntryPayload Create(Expression expression)
29+
{
30+
return new CreateIpAllowListEntryPayload(expression);
31+
}
32+
}
33+
}

Octokit.GraphQL/Model/CreatePullRequestInput.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ public class CreatePullRequestInput
4141
/// </summary>
4242
public bool? MaintainerCanModify { get; set; }
4343

44+
/// <summary>
45+
/// Indicates whether this pull request should be a draft.
46+
/// </summary>
47+
public bool? Draft { get; set; }
48+
4449
/// <summary>
4550
/// A unique identifier for the client performing the mutation.
4651
/// </summary>
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 DeleteDeployment
8+
/// </summary>
9+
public class DeleteDeploymentInput
10+
{
11+
/// <summary>
12+
/// The Node ID of the deployment to be deleted.
13+
/// </summary>
14+
public ID Id { 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+
}

0 commit comments

Comments
 (0)