From 2754883c121bbd220b866864aaa6041ebf95472b Mon Sep 17 00:00:00 2001 From: Caleb Lloyd Date: Sat, 29 Nov 2025 15:27:45 -0500 Subject: [PATCH 1/2] Revert "job.id is long (#2)" This reverts commit d12a54eb3ea64a35e29e58fa8b1cdd6a54bf8131. --- src/GitHub/Models/Job.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GitHub/Models/Job.cs b/src/GitHub/Models/Job.cs index 3beae8ed1..8be75d7a9 100644 --- a/src/GitHub/Models/Job.cs +++ b/src/GitHub/Models/Job.cs @@ -54,7 +54,7 @@ public partial class Job : IAdditionalDataHolder, IParsable public string HtmlUrl { get; set; } #endif /// The id of the job. - public long? Id { get; set; } + public int? Id { get; set; } /// Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -171,7 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() { "head_branch", n => { HeadBranch = n.GetStringValue(); } }, { "head_sha", n => { HeadSha = n.GetStringValue(); } }, { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, - { "id", n => { Id = n.GetLongValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "name", n => { Name = n.GetStringValue(); } }, { "node_id", n => { NodeId = n.GetStringValue(); } }, @@ -203,7 +203,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("head_branch", HeadBranch); writer.WriteStringValue("head_sha", HeadSha); writer.WriteStringValue("html_url", HtmlUrl); - writer.WriteLongValue("id", Id); + writer.WriteIntValue("id", Id); writer.WriteCollectionOfPrimitiveValues("labels", Labels); writer.WriteStringValue("name", Name); writer.WriteStringValue("node_id", NodeId); From 40cefa418665247b018b0f75bd44589a251be3ae Mon Sep 17 00:00:00 2001 From: Caleb Lloyd Date: Sat, 29 Nov 2025 15:32:05 -0500 Subject: [PATCH 2/2] convert more int to long Signed-off-by: Caleb Lloyd --- src/GitHub/Models/Job.cs | 12 ++++++------ src/GitHub/Models/Workflow.cs | 6 +++--- src/GitHub/Models/WorkflowRun.cs | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/GitHub/Models/Job.cs b/src/GitHub/Models/Job.cs index 8be75d7a9..2500a214a 100644 --- a/src/GitHub/Models/Job.cs +++ b/src/GitHub/Models/Job.cs @@ -54,7 +54,7 @@ public partial class Job : IAdditionalDataHolder, IParsable public string HtmlUrl { get; set; } #endif /// The id of the job. - public int? Id { get; set; } + public long? Id { get; set; } /// Labels for the workflow job. Specified by the "runs_on" attribute in the action's workflow file. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -82,7 +82,7 @@ public partial class Job : IAdditionalDataHolder, IParsable /// Attempt number of the associated workflow run, 1 for first attempt and higher if the workflow was re-run. public int? RunAttempt { get; set; } /// The id of the associated workflow run. - public int? RunId { get; set; } + public long? RunId { get; set; } /// The ID of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) public int? RunnerGroupId { get; set; } /// The name of the runner group to which this job has been assigned. (If a runner hasn't yet been assigned, this will be null.) @@ -171,12 +171,12 @@ public virtual IDictionary> GetFieldDeserializers() { "head_branch", n => { HeadBranch = n.GetStringValue(); } }, { "head_sha", n => { HeadSha = n.GetStringValue(); } }, { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, - { "id", n => { Id = n.GetIntValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, { "labels", n => { Labels = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "name", n => { Name = n.GetStringValue(); } }, { "node_id", n => { NodeId = n.GetStringValue(); } }, { "run_attempt", n => { RunAttempt = n.GetIntValue(); } }, - { "run_id", n => { RunId = n.GetIntValue(); } }, + { "run_id", n => { RunId = n.GetLongValue(); } }, { "run_url", n => { RunUrl = n.GetStringValue(); } }, { "runner_group_id", n => { RunnerGroupId = n.GetIntValue(); } }, { "runner_group_name", n => { RunnerGroupName = n.GetStringValue(); } }, @@ -203,12 +203,12 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("head_branch", HeadBranch); writer.WriteStringValue("head_sha", HeadSha); writer.WriteStringValue("html_url", HtmlUrl); - writer.WriteIntValue("id", Id); + writer.WriteLongValue("id", Id); writer.WriteCollectionOfPrimitiveValues("labels", Labels); writer.WriteStringValue("name", Name); writer.WriteStringValue("node_id", NodeId); writer.WriteIntValue("run_attempt", RunAttempt); - writer.WriteIntValue("run_id", RunId); + writer.WriteLongValue("run_id", RunId); writer.WriteIntValue("runner_group_id", RunnerGroupId); writer.WriteStringValue("runner_group_name", RunnerGroupName); writer.WriteIntValue("runner_id", RunnerId); diff --git a/src/GitHub/Models/Workflow.cs b/src/GitHub/Models/Workflow.cs index c720ce723..eb34c8f2d 100644 --- a/src/GitHub/Models/Workflow.cs +++ b/src/GitHub/Models/Workflow.cs @@ -36,7 +36,7 @@ public partial class Workflow : IAdditionalDataHolder, IParsable public string HtmlUrl { get; set; } #endif /// The id property - public int? Id { get; set; } + public long? Id { get; set; } /// The name property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -102,7 +102,7 @@ public virtual IDictionary> GetFieldDeserializers() { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, { "deleted_at", n => { DeletedAt = n.GetDateTimeOffsetValue(); } }, { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, - { "id", n => { Id = n.GetIntValue(); } }, + { "id", n => { Id = n.GetLongValue(); } }, { "name", n => { Name = n.GetStringValue(); } }, { "node_id", n => { NodeId = n.GetStringValue(); } }, { "path", n => { Path = n.GetStringValue(); } }, @@ -122,7 +122,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteDateTimeOffsetValue("created_at", CreatedAt); writer.WriteDateTimeOffsetValue("deleted_at", DeletedAt); writer.WriteStringValue("html_url", HtmlUrl); - writer.WriteIntValue("id", Id); + writer.WriteLongValue("id", Id); writer.WriteStringValue("name", Name); writer.WriteStringValue("node_id", NodeId); writer.WriteStringValue("path", Path); diff --git a/src/GitHub/Models/WorkflowRun.cs b/src/GitHub/Models/WorkflowRun.cs index c7ee3a7c9..f237610a1 100644 --- a/src/GitHub/Models/WorkflowRun.cs +++ b/src/GitHub/Models/WorkflowRun.cs @@ -40,7 +40,7 @@ public partial class WorkflowRun : IAdditionalDataHolder, IParsable public string CancelUrl { get; set; } #endif /// The ID of the associated check suite. - public int? CheckSuiteId { get; set; } + public long? CheckSuiteId { get; set; } /// The node ID of the associated check suite. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -240,7 +240,7 @@ public partial class WorkflowRun : IAdditionalDataHolder, IParsable public string Url { get; set; } #endif /// The ID of the parent workflow. - public int? WorkflowId { get; set; } + public long? WorkflowId { get; set; } /// The URL to the workflow. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -277,7 +277,7 @@ public virtual IDictionary> GetFieldDeserializers() { "actor", n => { Actor = n.GetObjectValue(global::GitHub.Models.SimpleUser.CreateFromDiscriminatorValue); } }, { "artifacts_url", n => { ArtifactsUrl = n.GetStringValue(); } }, { "cancel_url", n => { CancelUrl = n.GetStringValue(); } }, - { "check_suite_id", n => { CheckSuiteId = n.GetIntValue(); } }, + { "check_suite_id", n => { CheckSuiteId = n.GetLongValue(); } }, { "check_suite_node_id", n => { CheckSuiteNodeId = n.GetStringValue(); } }, { "check_suite_url", n => { CheckSuiteUrl = n.GetStringValue(); } }, { "conclusion", n => { Conclusion = n.GetStringValue(); } }, @@ -308,7 +308,7 @@ public virtual IDictionary> GetFieldDeserializers() { "triggering_actor", n => { TriggeringActor = n.GetObjectValue(global::GitHub.Models.SimpleUser.CreateFromDiscriminatorValue); } }, { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, { "url", n => { Url = n.GetStringValue(); } }, - { "workflow_id", n => { WorkflowId = n.GetIntValue(); } }, + { "workflow_id", n => { WorkflowId = n.GetLongValue(); } }, { "workflow_url", n => { WorkflowUrl = n.GetStringValue(); } }, }; } @@ -322,7 +322,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteObjectValue("actor", Actor); writer.WriteStringValue("artifacts_url", ArtifactsUrl); writer.WriteStringValue("cancel_url", CancelUrl); - writer.WriteIntValue("check_suite_id", CheckSuiteId); + writer.WriteLongValue("check_suite_id", CheckSuiteId); writer.WriteStringValue("check_suite_node_id", CheckSuiteNodeId); writer.WriteStringValue("check_suite_url", CheckSuiteUrl); writer.WriteStringValue("conclusion", Conclusion); @@ -353,7 +353,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteObjectValue("triggering_actor", TriggeringActor); writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); writer.WriteStringValue("url", Url); - writer.WriteIntValue("workflow_id", WorkflowId); + writer.WriteLongValue("workflow_id", WorkflowId); writer.WriteStringValue("workflow_url", WorkflowUrl); writer.WriteAdditionalData(AdditionalData); }