-
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
installation_target
event (#236)
- Loading branch information
1 parent
04030ee
commit 27b767c
Showing
9 changed files
with
95 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
src/Octokit.Webhooks/Events/InstallationTarget/InstallationTargetAction.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,12 @@ | ||
namespace Octokit.Webhooks.Events.InstallationTarget; | ||
|
||
[PublicAPI] | ||
public sealed record InstallationTargetAction : WebhookEventAction | ||
{ | ||
public static readonly InstallationTargetAction Renamed = new(InstallationTargetActionValue.Renamed); | ||
|
||
private InstallationTargetAction(string value) | ||
: base(value) | ||
{ | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/Octokit.Webhooks/Events/InstallationTarget/InstallationTargetActionValue.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,6 @@ | ||
namespace Octokit.Webhooks.Events.InstallationTarget; | ||
|
||
public static class InstallationTargetActionValue | ||
{ | ||
public const string Renamed = "renamed"; | ||
} |
20 changes: 20 additions & 0 deletions
20
src/Octokit.Webhooks/Events/InstallationTarget/InstallationTargetRenamedEvent.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.Events.InstallationTarget; | ||
|
||
using Octokit.Webhooks.Models.InstallationTargetEvent; | ||
|
||
[PublicAPI] | ||
[WebhookActionType(InstallationTargetActionValue.Renamed)] | ||
public sealed record InstallationTargetRenamedEvent : InstallationTargetEvent | ||
{ | ||
[JsonPropertyName("action")] | ||
public override string Action => InstallationTargetActionValue.Renamed; | ||
|
||
[JsonPropertyName("account")] | ||
public User Account { get; init; } = null!; | ||
|
||
[JsonPropertyName("changes")] | ||
public Changes Changes { get; init; } = null!; | ||
|
||
[JsonPropertyName("target_type")] | ||
public InstallationTargetType TargetType { get; init; } | ||
} |
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,6 @@ | ||
namespace Octokit.Webhooks.Events; | ||
|
||
[PublicAPI] | ||
[WebhookEventType(WebhookEventType.InstallationTarget)] | ||
[JsonConverter(typeof(WebhookConverter<InstallationTargetEvent>))] | ||
public abstract record InstallationTargetEvent : WebhookEvent; |
11 changes: 11 additions & 0 deletions
11
src/Octokit.Webhooks/Models/InstallationTargetEvent/Changes.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,11 @@ | ||
namespace Octokit.Webhooks.Models.InstallationTargetEvent; | ||
|
||
[PublicAPI] | ||
public sealed record Changes | ||
{ | ||
[JsonPropertyName("login")] | ||
public ChangesLogin? Login { get; init; } | ||
|
||
[JsonPropertyName("slug")] | ||
public ChangesSlug? Slug { get; init; } | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Octokit.Webhooks/Models/InstallationTargetEvent/ChangesLogin.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,8 @@ | ||
namespace Octokit.Webhooks.Models.InstallationTargetEvent; | ||
|
||
[PublicAPI] | ||
public record ChangesLogin | ||
{ | ||
[JsonPropertyName("from")] | ||
public string From { get; init; } = null!; | ||
} |
8 changes: 8 additions & 0 deletions
8
src/Octokit.Webhooks/Models/InstallationTargetEvent/ChangesSlug.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,8 @@ | ||
namespace Octokit.Webhooks.Models.InstallationTargetEvent; | ||
|
||
[PublicAPI] | ||
public sealed record ChangesSlug | ||
{ | ||
[JsonPropertyName("from")] | ||
public string From { get; init; } = null!; | ||
} |
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