Skip to content

Commit fef2883

Browse files
Revert "Added a new overload of CreateMethodCall that accepts Expression<Func<TObject, IEnumerable<TValue>>> selector"
This reverts commit 3923872.
1 parent 3923872 commit fef2883

Some content is hidden

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

47 files changed

+125
-767
lines changed

Octokit.GraphQL.Core/Core/Builders/QueryEntityBuilders.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
using System;
2-
using System.Collections;
32
using System.Collections.Generic;
4-
using System.Linq;
53
using System.Linq.Expressions;
64
using System.Reflection;
7-
using Octokit.GraphQL.Core.Utilities;
85

96
namespace Octokit.GraphQL.Core.Builders
107
{
@@ -54,26 +51,6 @@ public static IQueryableValue<TValue> CreateMethodCall<TObject, TValue>(
5451
arguments));
5552
}
5653

57-
public static IEnumerable<TValue> CreateMethodCall<TObject, TValue>(
58-
this TObject o,
59-
Expression<Func<TObject, IEnumerable<TValue>>> selector)
60-
where TObject : IQueryableValue
61-
{
62-
var methodCall = (MethodCallExpression)selector.Body;
63-
var arguments = new List<ConstantExpression>();
64-
65-
foreach (MemberExpression arg in methodCall.Arguments)
66-
{
67-
var expression = (ConstantExpression)arg.Expression;
68-
var value = ((FieldInfo)arg.Member).GetValue(expression.Value);
69-
arguments.Add(Expression.Constant(value, arg.Type));
70-
}
71-
72-
return (IEnumerable<TValue>)(Expression.Call(Expression.Constant(o),
73-
methodCall.Method,
74-
arguments));
75-
}
76-
7754
public static TValue CreateMethodCall<TObject, TValue>(
7855
this TObject o,
7956
Expression<Func<TObject, TValue>> selector,

Octokit.GraphQL.Core/QueryableListExtensions.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ public static IDictionary<TKey, TElement> ToDictionary<TSource, TKey, TElement>(
7070
[MethodId(nameof(ToListMethod))]
7171
public static List<TValue> ToList<TValue>(this IQueryableList<TValue> source)
7272
{
73-
return source.ToList<TValue>();
74-
73+
throw new NotImplementedException();
7574
}
7675

7776
public static ICompiledQuery<IEnumerable<T>> Compile<T>(this IQueryableList<T> expression)

Octokit.GraphQL.sln.DotSettings

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
66
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
77
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
8-
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
98
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
109
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
1110
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
using System;
2+
using System.Runtime.Serialization;
3+
using Newtonsoft.Json;
4+
using Newtonsoft.Json.Converters;
5+
6+
namespace Octokit.GraphQL.Model
7+
{
8+
/// <summary>
9+
/// The possible capabilities for action executions setting.
10+
/// </summary>
11+
[JsonConverter(typeof(StringEnumConverter))]
12+
public enum ActionExecutionCapabilitySetting
13+
{
14+
/// <summary>
15+
/// All action executions are disabled.
16+
/// </summary>
17+
[EnumMember(Value = "DISABLED")]
18+
Disabled,
19+
20+
/// <summary>
21+
/// All action executions are enabled.
22+
/// </summary>
23+
[EnumMember(Value = "ALL_ACTIONS")]
24+
AllActions,
25+
26+
/// <summary>
27+
/// Only actions defined within the repo are allowed.
28+
/// </summary>
29+
[EnumMember(Value = "LOCAL_ACTIONS_ONLY")]
30+
LocalActionsOnly,
31+
32+
/// <summary>
33+
/// Organization administrators action execution capabilities.
34+
/// </summary>
35+
[EnumMember(Value = "NO_POLICY")]
36+
NoPolicy,
37+
}
38+
}

Octokit.GraphQL/Model/BaseRefChangedEvent.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,28 +25,13 @@ internal BaseRefChangedEvent(Expression expression) : base(expression)
2525
/// </summary>
2626
public DateTimeOffset CreatedAt { get; }
2727

28-
/// <summary>
29-
/// Identifies the name of the base ref for the pull request after it was changed.
30-
/// </summary>
31-
public string CurrentRefName { get; }
32-
3328
/// <summary>
3429
/// Identifies the primary key from the database.
3530
/// </summary>
3631
public int? DatabaseId { get; }
3732

3833
public ID Id { get; }
3934

40-
/// <summary>
41-
/// Identifies the name of the base ref for the pull request before it was changed.
42-
/// </summary>
43-
public string PreviousRefName { get; }
44-
45-
/// <summary>
46-
/// PullRequest referenced by event.
47-
/// </summary>
48-
public PullRequest PullRequest => this.CreateProperty(x => x.PullRequest, Octokit.GraphQL.Model.PullRequest.Create);
49-
5035
internal static BaseRefChangedEvent Create(Expression expression)
5136
{
5237
return new BaseRefChangedEvent(expression);

Octokit.GraphQL/Model/CommentAuthorAssociation.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,6 @@ public enum CommentAuthorAssociation
2323
[EnumMember(Value = "OWNER")]
2424
Owner,
2525

26-
/// <summary>
27-
/// Author is a placeholder for an unclaimed user.
28-
/// </summary>
29-
[EnumMember(Value = "MANNEQUIN")]
30-
Mannequin,
31-
3226
/// <summary>
3327
/// Author has been invited to collaborate on the repository.
3428
/// </summary>

Octokit.GraphQL/Model/CommentDeletedEvent.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ internal CommentDeletedEvent(Expression expression) : base(expression)
3030
/// </summary>
3131
public int? DatabaseId { get; }
3232

33-
/// <summary>
34-
/// The user who authored the deleted comment.
35-
/// </summary>
36-
public IActor DeletedCommentAuthor => this.CreateProperty(x => x.DeletedCommentAuthor, Octokit.GraphQL.Model.Internal.StubIActor.Create);
37-
3833
public ID Id { get; }
3934

4035
internal static CommentDeletedEvent Create(Expression expression)

Octokit.GraphQL/Model/Commit.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ internal Commit(Expression expression) : base(expression)
5050
/// </summary>
5151
public DateTimeOffset AuthoredDate { get; }
5252

53-
/// <summary>
54-
/// The list of authors for this commit based on the git author and the Co-authored-by
55-
/// message trailer. The git author will always be first.
56-
/// </summary>
57-
/// <param name="first">Returns the first _n_ elements from the list.</param>
58-
/// <param name="after">Returns the elements in the list that come after the specified cursor.</param>
59-
/// <param name="last">Returns the last _n_ elements from the list.</param>
60-
/// <param name="before">Returns the elements in the list that come before the specified cursor.</param>
61-
public GitActorConnection Authors(Arg<int>? first = null, Arg<string>? after = null, Arg<int>? last = null, Arg<string>? before = null) => this.CreateMethodCall(x => x.Authors(first, after, last, before), Octokit.GraphQL.Model.GitActorConnection.Create);
62-
6353
/// <summary>
6454
/// Fetches `git blame` information.
6555
/// </summary>
@@ -131,12 +121,6 @@ internal Commit(Expression expression) : base(expression)
131121
/// <param name="orderBy">Ordering options for deployments returned from the connection.</param>
132122
public DeploymentConnection Deployments(Arg<int>? first = null, Arg<string>? after = null, Arg<int>? last = null, Arg<string>? before = null, Arg<IEnumerable<string>>? environments = null, Arg<DeploymentOrder>? orderBy = null) => this.CreateMethodCall(x => x.Deployments(first, after, last, before, environments, orderBy), Octokit.GraphQL.Model.DeploymentConnection.Create);
133123

134-
/// <summary>
135-
/// The tree entry representing the file located at the given path.
136-
/// </summary>
137-
/// <param name="path">The path for the file</param>
138-
public TreeEntry File(Arg<string> path) => this.CreateMethodCall(x => x.File(path), Octokit.GraphQL.Model.TreeEntry.Create);
139-
140124
/// <summary>
141125
/// The linear commit history starting from (and including) this commit, in the same order as `git log`.
142126
/// </summary>

Octokit.GraphQL/Model/CreateBranchProtectionRuleInput.cs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,6 @@ public class CreateBranchProtectionRuleInput
3333
/// </summary>
3434
public bool? RequiresCommitSignatures { get; set; }
3535

36-
/// <summary>
37-
/// Are merge commits prohibited from being pushed to this branch.
38-
/// </summary>
39-
public bool? RequiresLinearHistory { get; set; }
40-
41-
/// <summary>
42-
/// Are force pushes allowed on this branch.
43-
/// </summary>
44-
public bool? AllowsForcePushes { get; set; }
45-
46-
/// <summary>
47-
/// Can this branch be deleted.
48-
/// </summary>
49-
public bool? AllowsDeletions { get; set; }
50-
5136
/// <summary>
5237
/// Can admins overwrite branch protection.
5338
/// </summary>

Octokit.GraphQL/Model/CreateIssueInput.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ public class CreateIssueInput
4343
/// </summary>
4444
public IEnumerable<ID> ProjectIds { get; set; }
4545

46-
/// <summary>
47-
/// The name of an issue template in the repository, assigns labels and assignees from the template to the issue
48-
/// </summary>
49-
public string IssueTemplate { get; set; }
50-
5146
/// <summary>
5247
/// A unique identifier for the client performing the mutation.
5348
/// </summary>

0 commit comments

Comments
 (0)