Skip to content

Commit 2df6bed

Browse files
authored
feat: Adds AlertsRequestBuilder[pr request parameter], InstancesRequestBuilder[pr request parameter], AnalysesRequestBuilder[pr request parameter] (#126)
* New updates to generated code * New updates to generated code
1 parent f9fe1b4 commit 2df6bed

11 files changed

+24
-14
lines changed

src/GitHub.Octokit.SDK.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</PropertyGroup>
3434

3535
<ItemGroup>
36-
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.0.2" />
36+
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.1.0" />
3737
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.12.4" />
3838
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.12.4" />
3939
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.12.4" />

src/GitHub/Models/OrgRulesetConditions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace GitHub.Models
99
{
1010
/// <summary>
11-
/// Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.
11+
/// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.
1212
/// </summary>
1313
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
1414
public partial class OrgRulesetConditions : IAdditionalDataHolder, IParsable

src/GitHub/Models/RepositoryRulesetBypassActor.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ public partial class RepositoryRulesetBypassActor : IAdditionalDataHolder, IPars
1919
public global::GitHub.Models.RepositoryRulesetBypassActor_actor_type? ActorType { get; set; }
2020
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
2121
public IDictionary<string, object> AdditionalData { get; set; }
22-
/// <summary>When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type.</summary>
22+
/// <summary>When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets.</summary>
2323
public global::GitHub.Models.RepositoryRulesetBypassActor_bypass_mode? BypassMode { get; set; }
2424
/// <summary>
2525
/// Instantiates a new <see cref="global::GitHub.Models.RepositoryRulesetBypassActor"/> and sets the default values.
2626
/// </summary>
2727
public RepositoryRulesetBypassActor()
2828
{
2929
AdditionalData = new Dictionary<string, object>();
30+
BypassMode = global::GitHub.Models.RepositoryRulesetBypassActor_bypass_mode.Always;
3031
}
3132
/// <summary>
3233
/// Creates a new instance of the appropriate class based on discriminator value

src/GitHub/Models/RepositoryRulesetBypassActor_bypass_mode.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System;
44
namespace GitHub.Models
55
{
6-
/// <summary>When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type.</summary>
6+
/// <summary>When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests. `pull_request` is not applicable for the `DeployKey` actor type. Also, `pull_request` is only applicable to branch rulesets.</summary>
77
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
88
public enum RepositoryRulesetBypassActor_bypass_mode
99
{

src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public partial class WithRuleset_PutRequestBody : IAdditionalDataHolder, IParsab
2323
#else
2424
public List<global::GitHub.Models.RepositoryRulesetBypassActor> BypassActors { get; set; }
2525
#endif
26-
/// <summary>Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.</summary>
26+
/// <summary>Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.</summary>
2727
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
2828
#nullable enable
2929
public global::GitHub.Models.OrgRulesetConditions? Conditions { get; set; }

src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public partial class RulesetsPostRequestBody : IAdditionalDataHolder, IParsable
2323
#else
2424
public List<global::GitHub.Models.RepositoryRulesetBypassActor> BypassActors { get; set; }
2525
#endif
26-
/// <summary>Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.</summary>
26+
/// <summary>Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.</summary>
2727
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
2828
#nullable enable
2929
public global::GitHub.Models.OrgRulesetConditions? Conditions { get; set; }

src/GitHub/Repos/Item/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public partial class AlertsRequestBuilder : BaseRequestBuilder
3535
/// </summary>
3636
/// <param name="pathParameters">Path parameters for the request</param>
3737
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
38-
public AlertsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts{?direction*,page*,per_page*,ref*,severity*,sort*,state*,tool_guid*,tool_name*}", pathParameters)
38+
public AlertsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts{?direction*,page*,per_page*,pr*,ref*,severity*,sort*,state*,tool_guid*,tool_name*}", pathParameters)
3939
{
4040
}
4141
/// <summary>
4242
/// Instantiates a new <see cref="global::GitHub.Repos.Item.Item.CodeScanning.Alerts.AlertsRequestBuilder"/> and sets the default values.
4343
/// </summary>
4444
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
4545
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
46-
public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts{?direction*,page*,per_page*,ref*,severity*,sort*,state*,tool_guid*,tool_name*}", rawUrl)
46+
public AlertsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts{?direction*,page*,per_page*,pr*,ref*,severity*,sort*,state*,tool_guid*,tool_name*}", rawUrl)
4747
{
4848
}
4949
/// <summary>
@@ -118,6 +118,9 @@ public partial class AlertsRequestBuilderGetQueryParameters
118118
/// <summary>The number of results per page (max 100). For more information, see &quot;[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).&quot;</summary>
119119
[QueryParameter("per_page")]
120120
public int? PerPage { get; set; }
121+
/// <summary>The number of the pull request for the results you want to list.</summary>
122+
[QueryParameter("pr")]
123+
public int? Pr { get; set; }
121124
/// <summary>The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/&lt;branch name&gt;` or simply `&lt;branch name&gt;`. To reference a pull request use `refs/pull/&lt;number&gt;/merge`.</summary>
122125
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
123126
#nullable enable

src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Instances/InstancesRequestBuilder.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ public partial class InstancesRequestBuilder : BaseRequestBuilder
2222
/// </summary>
2323
/// <param name="pathParameters">Path parameters for the request</param>
2424
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
25-
public InstancesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/instances{?page*,per_page*,ref*}", pathParameters)
25+
public InstancesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/instances{?page*,per_page*,pr*,ref*}", pathParameters)
2626
{
2727
}
2828
/// <summary>
2929
/// Instantiates a new <see cref="global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Instances.InstancesRequestBuilder"/> and sets the default values.
3030
/// </summary>
3131
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
3232
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
33-
public InstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/instances{?page*,per_page*,ref*}", rawUrl)
33+
public InstancesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/instances{?page*,per_page*,pr*,ref*}", rawUrl)
3434
{
3535
}
3636
/// <summary>
@@ -102,6 +102,9 @@ public partial class InstancesRequestBuilderGetQueryParameters
102102
/// <summary>The number of results per page (max 100). For more information, see &quot;[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).&quot;</summary>
103103
[QueryParameter("per_page")]
104104
public int? PerPage { get; set; }
105+
/// <summary>The number of the pull request for the results you want to list.</summary>
106+
[QueryParameter("pr")]
107+
public int? Pr { get; set; }
105108
/// <summary>The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/&lt;branch name&gt;` or simply `&lt;branch name&gt;`. To reference a pull request use `refs/pull/&lt;number&gt;/merge`.</summary>
106109
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
107110
#nullable enable

src/GitHub/Repos/Item/Item/CodeScanning/Analyses/AnalysesRequestBuilder.cs

+5-2
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public partial class AnalysesRequestBuilder : BaseRequestBuilder
3535
/// </summary>
3636
/// <param name="pathParameters">Path parameters for the request</param>
3737
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
38-
public AnalysesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses{?direction*,page*,per_page*,ref*,sarif_id*,sort*,tool_guid*,tool_name*}", pathParameters)
38+
public AnalysesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses{?direction*,page*,per_page*,pr*,ref*,sarif_id*,sort*,tool_guid*,tool_name*}", pathParameters)
3939
{
4040
}
4141
/// <summary>
4242
/// Instantiates a new <see cref="global::GitHub.Repos.Item.Item.CodeScanning.Analyses.AnalysesRequestBuilder"/> and sets the default values.
4343
/// </summary>
4444
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
4545
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
46-
public AnalysesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses{?direction*,page*,per_page*,ref*,sarif_id*,sort*,tool_guid*,tool_name*}", rawUrl)
46+
public AnalysesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/analyses{?direction*,page*,per_page*,pr*,ref*,sarif_id*,sort*,tool_guid*,tool_name*}", rawUrl)
4747
{
4848
}
4949
/// <summary>
@@ -118,6 +118,9 @@ public partial class AnalysesRequestBuilderGetQueryParameters
118118
/// <summary>The number of results per page (max 100). For more information, see &quot;[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).&quot;</summary>
119119
[QueryParameter("per_page")]
120120
public int? PerPage { get; set; }
121+
/// <summary>The number of the pull request for the results you want to list.</summary>
122+
[QueryParameter("pr")]
123+
public int? Pr { get; set; }
121124
/// <summary>The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/&lt;branch name&gt;` or simply `&lt;branch name&gt;`. To reference a pull request use `refs/pull/&lt;number&gt;/merge`.</summary>
122125
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
123126
#nullable enable

src/GitHub/kiota-lock.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"descriptionHash": "59564BC4056B932C210E840166B6B0323AC854A3A17378C23965D01C1CE7C19925C5D6803251F152AB77772EC28EB43237470850DA6661671E90C4B50C64E652",
2+
"descriptionHash": "465ACB0611A29503ADB35236C24DE46088E11661E09BED91171E887E64A53313F9B1AD12A52B1DC1B29964EA8AE35C9D0E1A62C8CB950C389D038DFDF6942163",
33
"descriptionLocation": "../../../../../schemas/api.github.com.json",
44
"lockFileVersion": "1.0.0",
55
"kiotaVersion": "1.18.0",

test/Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<PrivateAssets>all</PrivateAssets>
3939
</PackageReference>
4040
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
41-
<PackageReference Include="xunit" Version="2.9.0" />
41+
<PackageReference Include="xunit" Version="2.9.2" />
4242
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" PrivateAssets="all" />
4343
<PackageReference Include="Moq" Version="4.20.72" />
4444
</ItemGroup>

0 commit comments

Comments
 (0)