diff --git a/src/GitHub.Octokit.GHEC.SDK.csproj b/src/GitHub.Octokit.GHEC.SDK.csproj index 59fbf478..f5985928 100644 --- a/src/GitHub.Octokit.GHEC.SDK.csproj +++ b/src/GitHub.Octokit.GHEC.SDK.csproj @@ -33,7 +33,7 @@ - + diff --git a/src/GitHub/Models/OrgRulesetConditions.cs b/src/GitHub/Models/OrgRulesetConditions.cs index f1a25609..97137ed1 100644 --- a/src/GitHub/Models/OrgRulesetConditions.cs +++ b/src/GitHub/Models/OrgRulesetConditions.cs @@ -8,7 +8,7 @@ namespace GitHub.Models { /// - /// 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. + /// 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. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] public partial class OrgRulesetConditions : IAdditionalDataHolder, IParsable diff --git a/src/GitHub/Models/RepositoryRulesetBypassActor.cs b/src/GitHub/Models/RepositoryRulesetBypassActor.cs index 7ffa72a8..eec8be8c 100644 --- a/src/GitHub/Models/RepositoryRulesetBypassActor.cs +++ b/src/GitHub/Models/RepositoryRulesetBypassActor.cs @@ -19,7 +19,7 @@ public partial class RepositoryRulesetBypassActor : IAdditionalDataHolder, IPars public global::GitHub.Models.RepositoryRulesetBypassActor_actor_type? ActorType { get; set; } /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// 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. + /// 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. public global::GitHub.Models.RepositoryRulesetBypassActor_bypass_mode? BypassMode { get; set; } /// /// Instantiates a new and sets the default values. @@ -27,6 +27,7 @@ public partial class RepositoryRulesetBypassActor : IAdditionalDataHolder, IPars public RepositoryRulesetBypassActor() { AdditionalData = new Dictionary(); + BypassMode = global::GitHub.Models.RepositoryRulesetBypassActor_bypass_mode.Always; } /// /// Creates a new instance of the appropriate class based on discriminator value diff --git a/src/GitHub/Models/RepositoryRulesetBypassActor_bypass_mode.cs b/src/GitHub/Models/RepositoryRulesetBypassActor_bypass_mode.cs index abc30cb9..fa6e5e06 100644 --- a/src/GitHub/Models/RepositoryRulesetBypassActor_bypass_mode.cs +++ b/src/GitHub/Models/RepositoryRulesetBypassActor_bypass_mode.cs @@ -3,7 +3,7 @@ using System; namespace GitHub.Models { - /// 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. + /// 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. [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] public enum RepositoryRulesetBypassActor_bypass_mode { diff --git a/src/GitHub/Models/Users.cs b/src/GitHub/Models/Users.cs index 5ccdff73..622ebb44 100644 --- a/src/GitHub/Models/Users.cs +++ b/src/GitHub/Models/Users.cs @@ -14,45 +14,23 @@ public partial class Users : IAdditionalDataHolder, IParsable { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } - /// The fragment property + /// Whether this email address is the primary address. + public bool? Primary { get; set; } + /// The type of email address. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public string? Fragment { get; set; } + public string? Type { get; set; } #nullable restore #else - public string Fragment { get; set; } + public string Type { get; set; } #endif - /// The matches property + /// The email address. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Matches { get; set; } + public string? Value { get; set; } #nullable restore #else - public List Matches { get; set; } -#endif - /// The object_type property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? ObjectType { get; set; } -#nullable restore -#else - public string ObjectType { get; set; } -#endif - /// The object_url property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? ObjectUrl { get; set; } -#nullable restore -#else - public string ObjectUrl { get; set; } -#endif - /// The property property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? Property { get; set; } -#nullable restore -#else - public string Property { get; set; } + public string Value { get; set; } #endif /// /// Instantiates a new and sets the default values. @@ -79,11 +57,9 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { - { "fragment", n => { Fragment = n.GetStringValue(); } }, - { "matches", n => { Matches = n.GetCollectionOfObjectValues(global::GitHub.Models.Users_matches.CreateFromDiscriminatorValue)?.AsList(); } }, - { "object_type", n => { ObjectType = n.GetStringValue(); } }, - { "object_url", n => { ObjectUrl = n.GetStringValue(); } }, - { "property", n => { Property = n.GetStringValue(); } }, + { "primary", n => { Primary = n.GetBoolValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// @@ -93,11 +69,9 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteStringValue("fragment", Fragment); - writer.WriteCollectionOfObjectValues("matches", Matches); - writer.WriteStringValue("object_type", ObjectType); - writer.WriteStringValue("object_url", ObjectUrl); - writer.WriteStringValue("property", Property); + writer.WriteBoolValue("primary", Primary); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/GitHub/Models/Users_matches.cs b/src/GitHub/Models/Users_matches.cs deleted file mode 100644 index 10b5df80..00000000 --- a/src/GitHub/Models/Users_matches.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -#pragma warning disable CS0618 -using Microsoft.Kiota.Abstractions.Extensions; -using Microsoft.Kiota.Abstractions.Serialization; -using System.Collections.Generic; -using System.IO; -using System; -namespace GitHub.Models -{ - [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] - #pragma warning disable CS1591 - public partial class Users_matches : IAdditionalDataHolder, IParsable - #pragma warning restore CS1591 - { - /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. - public IDictionary AdditionalData { get; set; } - /// The indices property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public List? Indices { get; set; } -#nullable restore -#else - public List Indices { get; set; } -#endif - /// The text property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? Text { get; set; } -#nullable restore -#else - public string Text { get; set; } -#endif - /// - /// Instantiates a new and sets the default values. - /// - public Users_matches() - { - AdditionalData = new Dictionary(); - } - /// - /// Creates a new instance of the appropriate class based on discriminator value - /// - /// A - /// The parse node to use to read the discriminator value and create the object - public static global::GitHub.Models.Users_matches CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Models.Users_matches(); - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - return new Dictionary> - { - { "indices", n => { Indices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, - { "text", n => { Text = n.GetStringValue(); } }, - }; - } - /// - /// Serializes information the current object - /// - /// Serialization writer to use to serialize this model - public virtual void Serialize(ISerializationWriter writer) - { - _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteCollectionOfPrimitiveValues("indices", Indices); - writer.WriteStringValue("text", Text); - writer.WriteAdditionalData(AdditionalData); - } - } -} -#pragma warning restore CS0618 diff --git a/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs b/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs index 534b7bcd..0a3363e1 100644 --- a/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs +++ b/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs @@ -23,7 +23,7 @@ public partial class WithRuleset_PutRequestBody : IAdditionalDataHolder, IParsab #else public List BypassActors { get; set; } #endif - /// 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. + /// 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. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::GitHub.Models.OrgRulesetConditions? Conditions { get; set; } diff --git a/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs b/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs index d3987802..79df45e0 100644 --- a/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs +++ b/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs @@ -23,7 +23,7 @@ public partial class RulesetsPostRequestBody : IAdditionalDataHolder, IParsable #else public List BypassActors { get; set; } #endif - /// 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. + /// 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. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::GitHub.Models.OrgRulesetConditions? Conditions { get; set; } diff --git a/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs index 110e06bc..7f2089fe 100644 --- a/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/AlertsRequestBuilder.cs @@ -35,7 +35,7 @@ public partial class AlertsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public AlertsRequestBuilder(Dictionary 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) + public AlertsRequestBuilder(Dictionary 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) { } /// @@ -43,7 +43,7 @@ public AlertsRequestBuilder(Dictionary pathParameters, IRequestA /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - 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) + 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) { } /// @@ -118,6 +118,9 @@ public partial class AlertsRequestBuilderGetQueryParameters /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." [QueryParameter("per_page")] public int? PerPage { get; set; } + /// The number of the pull request for the results you want to list. + [QueryParameter("pr")] + public int? Pr { get; set; } /// The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Instances/InstancesRequestBuilder.cs b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Instances/InstancesRequestBuilder.cs index 05b30fce..e0647cf2 100644 --- a/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Instances/InstancesRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Instances/InstancesRequestBuilder.cs @@ -22,7 +22,7 @@ public partial class InstancesRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public InstancesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/instances{?page*,per_page*,ref*}", pathParameters) + public InstancesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/instances{?page*,per_page*,pr*,ref*}", pathParameters) { } /// @@ -30,7 +30,7 @@ public InstancesRequestBuilder(Dictionary pathParameters, IReque /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - 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) + 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) { } /// @@ -102,6 +102,9 @@ public partial class InstancesRequestBuilderGetQueryParameters /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." [QueryParameter("per_page")] public int? PerPage { get; set; } + /// The number of the pull request for the results you want to list. + [QueryParameter("pr")] + public int? Pr { get; set; } /// The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/GitHub/Repos/Item/Item/CodeScanning/Analyses/AnalysesRequestBuilder.cs b/src/GitHub/Repos/Item/Item/CodeScanning/Analyses/AnalysesRequestBuilder.cs index 2bb29ab8..33c6c07f 100644 --- a/src/GitHub/Repos/Item/Item/CodeScanning/Analyses/AnalysesRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/CodeScanning/Analyses/AnalysesRequestBuilder.cs @@ -35,7 +35,7 @@ public partial class AnalysesRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public AnalysesRequestBuilder(Dictionary 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) + public AnalysesRequestBuilder(Dictionary 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) { } /// @@ -43,7 +43,7 @@ public AnalysesRequestBuilder(Dictionary pathParameters, IReques /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - 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) + 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) { } /// @@ -118,6 +118,9 @@ public partial class AnalysesRequestBuilderGetQueryParameters /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." [QueryParameter("per_page")] public int? PerPage { get; set; } + /// The number of the pull request for the results you want to list. + [QueryParameter("pr")] + public int? Pr { get; set; } /// The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/<branch name>` or simply `<branch name>`. To reference a pull request use `refs/pull/<number>/merge`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable diff --git a/src/GitHub/kiota-lock.json b/src/GitHub/kiota-lock.json index 1420e8e1..7566c2f8 100644 --- a/src/GitHub/kiota-lock.json +++ b/src/GitHub/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "824C10326A1DDCAD93CAF1528DE8AFF9E1CE0401CF9C9CE834BB8098351EDD76A3F7D4AFDBBABE854901BCB5A5D28AE3217A362A04BBBD687DF6A6B16F32F619", + "descriptionHash": "87602DA6C715B397697428178A8EE09CA95B357EE1DE1C084FF4E93531E88B6A82D97601A66F11B7883ADD0B187F180540DF1A9CA74F5C00998DB56E99965A6A", "descriptionLocation": "../../../../../schemas/ghec.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.18.0", diff --git a/test/Tests.csproj b/test/Tests.csproj index b3bcf701..6f077898 100644 --- a/test/Tests.csproj +++ b/test/Tests.csproj @@ -38,9 +38,9 @@ all - + - +