-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add missing deployment_status properties (#55)
* feat: Add missing deployment_status properties - Add missing properties to DeploymentStatusEvent - Add missing properties to WorkflowRun Contributes to #54. * feat: Add actor and triggering_actor Add the `actor` and `triggering_actor` properties to WorkflowRun. * feat: Add previous_attempt_url - Add missing `previous_attempt_url` property. - Sort properties according to the schema. * feat: Add missing deployment properties - Add missing properties/types for the `deployment` and `deployment_status` events. - Use dedicated types for `deployment_status`. - Add missing deployment event to `CheckRun`. - Add missing `environment_url` and `log_url` properties to `DeploymentStatus`.
- Loading branch information
1 parent
a39fe36
commit 67d6930
Showing
11 changed files
with
258 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/Octokit.Webhooks/Models/DeploymentEvent/DeploymentCheckRun.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
namespace Octokit.Webhooks.Models.DeploymentEvent | ||
{ | ||
using System; | ||
using System.Text.Json.Serialization; | ||
using JetBrains.Annotations; | ||
using Octokit.Webhooks.Converter; | ||
|
||
[PublicAPI] | ||
public sealed record DeploymentCheckRun | ||
{ | ||
[JsonPropertyName("id")] | ||
public long Id { get; init; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; init; } = null!; | ||
|
||
[JsonPropertyName("node_id")] | ||
public string NodeId { get; init; } = null!; | ||
|
||
[JsonPropertyName("head_sha")] | ||
public string HeadSha { get; init; } = null!; | ||
|
||
[JsonPropertyName("external_id")] | ||
public string ExternalId { get; init; } = null!; | ||
|
||
[JsonPropertyName("url")] | ||
public string Url { get; init; } = null!; | ||
|
||
[JsonPropertyName("html_url")] | ||
public string HtmlUrl { get; init; } = null!; | ||
|
||
[JsonPropertyName("details_url")] | ||
public string DetailsUrl { get; init; } = null!; | ||
|
||
[JsonPropertyName("status")] | ||
public DeploymentCheckRunStatus Status { get; init; } | ||
|
||
[JsonPropertyName("conclusion")] | ||
public DeploymentCheckRunConclusion? Conclusion { get; init; } | ||
|
||
[JsonPropertyName("started_at")] | ||
[JsonConverter(typeof(DateTimeOffsetConverter))] | ||
public DateTimeOffset StartedAt { get; init; } | ||
|
||
[JsonPropertyName("completed_at")] | ||
[JsonConverter(typeof(NullableDateTimeOffsetConverter))] | ||
public DateTimeOffset? CompletedAt { get; init; } | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/Octokit.Webhooks/Models/DeploymentEvent/DeploymentCheckRunConclusion.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
namespace Octokit.Webhooks.Models.DeploymentEvent | ||
{ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
[JsonConverter(typeof(JsonStringEnumMemberConverter))] | ||
public enum DeploymentCheckRunConclusion | ||
{ | ||
[EnumMember(Value = "success")] | ||
Success, | ||
[EnumMember(Value = "failure")] | ||
Failure, | ||
[EnumMember(Value = "neutral")] | ||
Neutral, | ||
[EnumMember(Value = "cancelled")] | ||
Cancelled, | ||
[EnumMember(Value = "timed_out")] | ||
TimedOut, | ||
[EnumMember(Value = "actionRequired")] | ||
ActionRequired, | ||
[EnumMember(Value = "stale")] | ||
Stale, | ||
[EnumMember(Value = "skipped")] | ||
Skipped, | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Octokit.Webhooks/Models/DeploymentEvent/DeploymentCheckRunStatus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Octokit.Webhooks.Models.DeploymentEvent | ||
{ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
[JsonConverter(typeof(JsonStringEnumMemberConverter))] | ||
public enum DeploymentCheckRunStatus | ||
{ | ||
[EnumMember(Value = "requested")] | ||
Requested, | ||
[EnumMember(Value = "in_progress")] | ||
InProgress, | ||
[EnumMember(Value = "completed")] | ||
Completed, | ||
[EnumMember(Value = "queued")] | ||
Queued, | ||
[EnumMember(Value = "waiting")] | ||
Waiting, | ||
} | ||
} |
79 changes: 79 additions & 0 deletions
79
src/Octokit.Webhooks/Models/DeploymentEvent/DeploymentWorkflowRun.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
namespace Octokit.Webhooks.Models.DeploymentEvent | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text.Json.Serialization; | ||
using JetBrains.Annotations; | ||
using Octokit.Webhooks.Converter; | ||
using Octokit.Webhooks.Models.CheckRunEvent; | ||
|
||
[PublicAPI] | ||
public sealed record DeploymentWorkflowRun | ||
{ | ||
[JsonPropertyName("id")] | ||
public long Id { get; init; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; init; } = null!; | ||
|
||
[JsonPropertyName("node_id")] | ||
public string NodeId { get; init; } = null!; | ||
|
||
[JsonPropertyName("head_branch")] | ||
public string HeadBranch { get; init; } = null!; | ||
|
||
[JsonPropertyName("head_sha")] | ||
public string HeadSha { get; init; } = null!; | ||
|
||
[JsonPropertyName("run_number")] | ||
public long RunNumber { get; init; } | ||
|
||
[JsonPropertyName("event")] | ||
public string Event { get; init; } = null!; | ||
|
||
[JsonPropertyName("status")] | ||
public DeploymentWorkflowRunStatus? Status { get; init; } | ||
|
||
[JsonPropertyName("conclusion")] | ||
public DeploymentWorkflowRunConclusion? Conclusion { get; init; } | ||
|
||
[JsonPropertyName("workflow_id")] | ||
public long WorkflowId { get; init; } | ||
|
||
[JsonPropertyName("check_suite_id")] | ||
public long CheckSuiteId { get; init; } | ||
|
||
[JsonPropertyName("check_suite_node_id")] | ||
public string CheckSuiteNodeId { get; init; } = null!; | ||
|
||
[JsonPropertyName("url")] | ||
public string Url { get; init; } = null!; | ||
|
||
[JsonPropertyName("html_url")] | ||
public string HtmlUrl { get; init; } = null!; | ||
|
||
[JsonPropertyName("pull_requests")] | ||
public IEnumerable<CheckRunPullRequest> PullRequests { get; init; } = null!; | ||
|
||
[JsonPropertyName("created_at")] | ||
[JsonConverter(typeof(DateTimeOffsetConverter))] | ||
public DateTimeOffset CreatedAt { get; init; } | ||
|
||
[JsonPropertyName("updated_at")] | ||
[JsonConverter(typeof(DateTimeOffsetConverter))] | ||
public DateTimeOffset UpdatedAt { get; init; } | ||
|
||
[JsonPropertyName("actor")] | ||
public User Actor { get; init; } = null!; | ||
|
||
[JsonPropertyName("triggering_actor")] | ||
public User TriggeringActor { get; init; } = null!; | ||
|
||
[JsonPropertyName("run_attempt")] | ||
public long RunAttempt { get; init; } | ||
|
||
[JsonPropertyName("run_started_at")] | ||
[JsonConverter(typeof(DateTimeOffsetConverter))] | ||
public DateTimeOffset RunStartedAt { get; init; } | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/Octokit.Webhooks/Models/DeploymentEvent/DeploymentWorkflowRunConclusion.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
namespace Octokit.Webhooks.Models.DeploymentEvent | ||
{ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
[JsonConverter(typeof(JsonStringEnumMemberConverter))] | ||
public enum DeploymentWorkflowRunConclusion | ||
{ | ||
[EnumMember(Value = "success")] | ||
Success, | ||
[EnumMember(Value = "failure")] | ||
Failure, | ||
[EnumMember(Value = "neutral")] | ||
Neutral, | ||
[EnumMember(Value = "cancelled")] | ||
Cancelled, | ||
[EnumMember(Value = "timed_out")] | ||
TimedOut, | ||
[EnumMember(Value = "action_required")] | ||
ActionRequired, | ||
[EnumMember(Value = "stale")] | ||
Stale, | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Octokit.Webhooks/Models/DeploymentEvent/DeploymentWorkflowRunStatus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
namespace Octokit.Webhooks.Models.DeploymentEvent | ||
{ | ||
using System.Runtime.Serialization; | ||
using System.Text.Json.Serialization; | ||
|
||
[JsonConverter(typeof(JsonStringEnumMemberConverter))] | ||
public enum DeploymentWorkflowRunStatus | ||
{ | ||
[EnumMember(Value = "requested")] | ||
Requested, | ||
[EnumMember(Value = "in_progress")] | ||
InProgress, | ||
[EnumMember(Value = "completed")] | ||
Completed, | ||
[EnumMember(Value = "queued")] | ||
Queued, | ||
[EnumMember(Value = "waiting")] | ||
Waiting, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters