From dcae15ec96f21855747d50492261cedae40dc1c8 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Mon, 24 Apr 2023 13:49:56 -0700 Subject: [PATCH] Update payload types (#250) * feat: new app permissions * feat: new `subject_type` property for `PullRequestReviewComment` events * feat: new properties for `workflow_job` events * feat: new `has_discussions` property on `Repository` schema * fix: update schema for `organization.renamed` event * fix: update types for `registry_package` event * feat: add new properties to `merge_group` event * feat: new properties found on the `repository` object * feat: new `cve_id` for `SecurityAdvisoryEvent` * misc fixes * ci: update sample payloads --- .../Organization/OrganizationRenamedEvent.cs | 6 +- .../RegistryPackage/RegistryPackageAction.cs | 14 + .../RegistryPackageActionValue.cs | 8 + .../RegistryPackagePublishedEvent.cs | 9 + .../RegistryPackageUpdatedEvent.cs | 9 + .../Events/RegistryPackageEvent.cs | 6 +- src/Octokit.Webhooks/Models/AppPermissions.cs | 21 + .../Models/ContainerMetadata.cs | 14 + .../Models/ContainerMetadataTag.cs | 11 + .../Models/MergeGroupEvent/MergeGroup.cs | 6 + .../Models/OrganizationEvent/Changes.cs | 8 + .../Models/OrganizationEvent/ChangesLogin.cs | 8 + src/Octokit.Webhooks/Models/Package.cs | 4 +- src/Octokit.Webhooks/Models/PackageType.cs | 20 + src/Octokit.Webhooks/Models/PackageVersion.cs | 47 ++- .../Models/PullRequestReviewComment.cs | 3 + .../PullRequestReviewCommentSubjectType.cs | 12 + src/Octokit.Webhooks/Models/Repository.cs | 15 + .../SecurityAdvisoryEvent/SecurityAdvisory.cs | 3 + .../Models/WorkflowJobEvent/WorkflowJob.cs | 9 + src/Octokit.Webhooks/WebhookEventProcessor.cs | 23 ++ .../content_reference/created.payload.json | 125 ------ .../merge_group/checks_requested.payload.json | 28 +- .../organization/renamed.payload.json | 42 ++ .../package/published.docker.payload.json | 374 ++++++++++++++++++ ...ayload.json => published.npm.payload.json} | 0 .../published.docker.payload.json | 374 ++++++++++++++++++ .../create.with-gh-alert.payload.json | 131 ------ .../security_advisory/published.payload.json | 3 +- .../security_advisory/updated.payload.json | 3 +- .../security_advisory/withdrawn.payload.json | 3 +- ...ted.failure.with-organization.payload.json | 5 +- ...ted.success.with-organization.payload.json | 5 +- .../workflow_job/in_progress.payload.json | 5 +- .../workflow_job/queued.payload.json | 5 +- .../workflow_run/completed.payload.json | 2 + .../completed.with-pull-requests.payload.json | 2 + .../workflow_run/requested.payload.json | 2 + .../requested.with-conclusion.payload.json | 2 + 39 files changed, 1077 insertions(+), 290 deletions(-) create mode 100644 src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageAction.cs create mode 100644 src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageActionValue.cs create mode 100644 src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackagePublishedEvent.cs create mode 100644 src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageUpdatedEvent.cs create mode 100644 src/Octokit.Webhooks/Models/ContainerMetadata.cs create mode 100644 src/Octokit.Webhooks/Models/ContainerMetadataTag.cs create mode 100644 src/Octokit.Webhooks/Models/OrganizationEvent/Changes.cs create mode 100644 src/Octokit.Webhooks/Models/OrganizationEvent/ChangesLogin.cs create mode 100644 src/Octokit.Webhooks/Models/PackageType.cs create mode 100644 src/Octokit.Webhooks/Models/PullRequestReviewCommentSubjectType.cs delete mode 100644 test/Octokit.Webhooks.Test/Resources/content_reference/created.payload.json create mode 100644 test/Octokit.Webhooks.Test/Resources/organization/renamed.payload.json create mode 100644 test/Octokit.Webhooks.Test/Resources/package/published.docker.payload.json rename test/Octokit.Webhooks.Test/Resources/package/{published.payload.json => published.npm.payload.json} (100%) create mode 100644 test/Octokit.Webhooks.Test/Resources/registry_package/published.docker.payload.json delete mode 100644 test/Octokit.Webhooks.Test/Resources/repository_vulnerability_alert/create.with-gh-alert.payload.json diff --git a/src/Octokit.Webhooks/Events/Organization/OrganizationRenamedEvent.cs b/src/Octokit.Webhooks/Events/Organization/OrganizationRenamedEvent.cs index 35d73196..f469914c 100644 --- a/src/Octokit.Webhooks/Events/Organization/OrganizationRenamedEvent.cs +++ b/src/Octokit.Webhooks/Events/Organization/OrganizationRenamedEvent.cs @@ -1,5 +1,7 @@ namespace Octokit.Webhooks.Events.Organization; +using Octokit.Webhooks.Models.OrganizationEvent; + [PublicAPI] [WebhookActionType(OrganizationActionValue.Renamed)] public sealed record OrganizationRenamedEvent : OrganizationEvent @@ -7,6 +9,6 @@ public sealed record OrganizationRenamedEvent : OrganizationEvent [JsonPropertyName("action")] public override string Action => OrganizationAction.Renamed; - [JsonPropertyName("membership")] - public Octokit.Webhooks.Models.Membership Membership { get; init; } = null!; + [JsonPropertyName("changes")] + public Changes Changes { get; init; } = null!; } diff --git a/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageAction.cs b/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageAction.cs new file mode 100644 index 00000000..742fb039 --- /dev/null +++ b/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageAction.cs @@ -0,0 +1,14 @@ +namespace Octokit.Webhooks.Events.RegistryPackage; + +[PublicAPI] +public sealed record RegistryPackageAction : WebhookEventAction +{ + public static readonly RegistryPackageAction Published = new(RegistryPackageActionValue.Published); + + public static readonly RegistryPackageAction Updated = new(RegistryPackageActionValue.Updated); + + private RegistryPackageAction(string value) + : base(value) + { + } +} diff --git a/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageActionValue.cs b/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageActionValue.cs new file mode 100644 index 00000000..a789369f --- /dev/null +++ b/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageActionValue.cs @@ -0,0 +1,8 @@ +namespace Octokit.Webhooks.Events.RegistryPackage; + +public static class RegistryPackageActionValue +{ + public const string Published = "published"; + + public const string Updated = "updated"; +} diff --git a/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackagePublishedEvent.cs b/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackagePublishedEvent.cs new file mode 100644 index 00000000..93614e49 --- /dev/null +++ b/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackagePublishedEvent.cs @@ -0,0 +1,9 @@ +namespace Octokit.Webhooks.Events.RegistryPackage; + +[PublicAPI] +[WebhookActionType(RegistryPackageActionValue.Published)] +public sealed record RegistryPackagePublishedEvent : RegistryPackageEvent +{ + [JsonPropertyName("action")] + public override string Action => RegistryPackageAction.Published; +} diff --git a/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageUpdatedEvent.cs b/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageUpdatedEvent.cs new file mode 100644 index 00000000..ada8695e --- /dev/null +++ b/src/Octokit.Webhooks/Events/RegistryPackage/RegistryPackageUpdatedEvent.cs @@ -0,0 +1,9 @@ +namespace Octokit.Webhooks.Events.RegistryPackage; + +[PublicAPI] +[WebhookActionType(RegistryPackageActionValue.Updated)] +public sealed record RegistryPackageUpdatedEvent : RegistryPackageEvent +{ + [JsonPropertyName("action")] + public override string Action => RegistryPackageAction.Updated; +} diff --git a/src/Octokit.Webhooks/Events/RegistryPackageEvent.cs b/src/Octokit.Webhooks/Events/RegistryPackageEvent.cs index e6021a53..3f2bc840 100644 --- a/src/Octokit.Webhooks/Events/RegistryPackageEvent.cs +++ b/src/Octokit.Webhooks/Events/RegistryPackageEvent.cs @@ -3,4 +3,8 @@ [PublicAPI] [WebhookEventType(WebhookEventType.RegistryPackage)] [JsonConverter(typeof(WebhookConverter))] -public abstract record RegistryPackageEvent : WebhookEvent; +public abstract record RegistryPackageEvent : WebhookEvent +{ + [JsonPropertyName("registry_package")] + public Models.Package Package { get; init; } = null!; +} diff --git a/src/Octokit.Webhooks/Models/AppPermissions.cs b/src/Octokit.Webhooks/Models/AppPermissions.cs index f83df382..c06c4d21 100644 --- a/src/Octokit.Webhooks/Models/AppPermissions.cs +++ b/src/Octokit.Webhooks/Models/AppPermissions.cs @@ -33,9 +33,21 @@ public sealed record AppPermissions [JsonPropertyName("environments")] public AppPermissionsLevel? Environments { get; init; } + [JsonPropertyName("followers")] + public AppPermissionsLevel? Followers { get; init; } + + [JsonPropertyName("gpg_keys")] + public AppPermissionsLevel? GpgKeys { get; init; } + + [JsonPropertyName("interaction_limits")] + public AppPermissionsLevel? InteractionLimits { get; init; } + [JsonPropertyName("issues")] public AppPermissionsLevel? Issues { get; init; } + [JsonPropertyName("keys")] + public AppPermissionsLevel? Keys { get; init; } + [JsonPropertyName("members")] public AppPermissionsLevel? Members { get; init; } @@ -75,6 +87,9 @@ public sealed record AppPermissions [JsonPropertyName("pages")] public AppPermissionsLevel? Pages { get; init; } + [JsonPropertyName("plan")] + public AppPermissionsLevel? Plan { get; init; } + [JsonPropertyName("pull_requests")] public AppPermissionsLevel? PullRequests { get; init; } @@ -99,6 +114,9 @@ public sealed record AppPermissions [JsonPropertyName("single_file")] public AppPermissionsLevel? SingleFile { get; init; } + [JsonPropertyName("starring")] + public AppPermissionsLevel? Starring { get; init; } + [JsonPropertyName("statuses")] public AppPermissionsLevel? Statuses { get; init; } @@ -108,6 +126,9 @@ public sealed record AppPermissions [JsonPropertyName("vulnerability_alerts")] public AppPermissionsLevel? VulnerabilityAlerts { get; init; } + [JsonPropertyName("watching")] + public AppPermissionsLevel? Watching { get; init; } + [JsonPropertyName("workflows")] public AppPermissionsLevel? Workflows { get; init; } } diff --git a/src/Octokit.Webhooks/Models/ContainerMetadata.cs b/src/Octokit.Webhooks/Models/ContainerMetadata.cs new file mode 100644 index 00000000..6ea88a5f --- /dev/null +++ b/src/Octokit.Webhooks/Models/ContainerMetadata.cs @@ -0,0 +1,14 @@ +namespace Octokit.Webhooks.Models; + +[PublicAPI] +public sealed record ContainerMetadata +{ + [JsonPropertyName("labels")] + public IDictionary? Labels { get; init; } + + [JsonPropertyName("manifest")] + public IDictionary? Manifest { get; init; } + + [JsonPropertyName("tag")] + public ContainerMetadataTag? Tag { get; init; } +} diff --git a/src/Octokit.Webhooks/Models/ContainerMetadataTag.cs b/src/Octokit.Webhooks/Models/ContainerMetadataTag.cs new file mode 100644 index 00000000..4212300f --- /dev/null +++ b/src/Octokit.Webhooks/Models/ContainerMetadataTag.cs @@ -0,0 +1,11 @@ +namespace Octokit.Webhooks.Models; + +[PublicAPI] +public sealed record ContainerMetadataTag +{ + [JsonPropertyName("digest")] + public string? Digest { get; init; } + + [JsonPropertyName("name")] + public string? Name { get; init; } +} diff --git a/src/Octokit.Webhooks/Models/MergeGroupEvent/MergeGroup.cs b/src/Octokit.Webhooks/Models/MergeGroupEvent/MergeGroup.cs index 6b895150..d3428eec 100644 --- a/src/Octokit.Webhooks/Models/MergeGroupEvent/MergeGroup.cs +++ b/src/Octokit.Webhooks/Models/MergeGroupEvent/MergeGroup.cs @@ -11,4 +11,10 @@ public sealed record MergeGroup [JsonPropertyName("base_ref")] public string BaseRef { get; init; } = null!; + + [JsonPropertyName("base_sha")] + public string BaseSha { get; init; } = null!; + + [JsonPropertyName("head_commit")] + public SimpleCommit HeadCommit { get; init; } = null!; } diff --git a/src/Octokit.Webhooks/Models/OrganizationEvent/Changes.cs b/src/Octokit.Webhooks/Models/OrganizationEvent/Changes.cs new file mode 100644 index 00000000..eda8fddb --- /dev/null +++ b/src/Octokit.Webhooks/Models/OrganizationEvent/Changes.cs @@ -0,0 +1,8 @@ +namespace Octokit.Webhooks.Models.OrganizationEvent; + +[PublicAPI] +public sealed record Changes +{ + [JsonPropertyName("login")] + public ChangesLogin Login { get; init; } = null!; +} diff --git a/src/Octokit.Webhooks/Models/OrganizationEvent/ChangesLogin.cs b/src/Octokit.Webhooks/Models/OrganizationEvent/ChangesLogin.cs new file mode 100644 index 00000000..1f8227d1 --- /dev/null +++ b/src/Octokit.Webhooks/Models/OrganizationEvent/ChangesLogin.cs @@ -0,0 +1,8 @@ +namespace Octokit.Webhooks.Models.OrganizationEvent; + +[PublicAPI] +public record ChangesLogin +{ + [JsonPropertyName("from")] + public string From { get; init; } = null!; +} diff --git a/src/Octokit.Webhooks/Models/Package.cs b/src/Octokit.Webhooks/Models/Package.cs index ba0c34f3..36f54e8d 100644 --- a/src/Octokit.Webhooks/Models/Package.cs +++ b/src/Octokit.Webhooks/Models/Package.cs @@ -19,7 +19,7 @@ public sealed record Package public string Ecosystem { get; init; } = null!; [JsonPropertyName("package_type")] - public string PackageType { get; init; } = null!; + public PackageType PackageType { get; init; } [JsonPropertyName("html_url")] public string HtmlUrl { get; init; } = null!; @@ -36,7 +36,7 @@ public sealed record Package public User Owner { get; init; } = null!; [JsonPropertyName("package_version")] - public PackageVersion PackageVersion { get; init; } = null!; + public PackageVersion? PackageVersion { get; init; } [JsonPropertyName("registry")] public PackageRegistry Registry { get; init; } = null!; diff --git a/src/Octokit.Webhooks/Models/PackageType.cs b/src/Octokit.Webhooks/Models/PackageType.cs new file mode 100644 index 00000000..6c186679 --- /dev/null +++ b/src/Octokit.Webhooks/Models/PackageType.cs @@ -0,0 +1,20 @@ +namespace Octokit.Webhooks.Models; + +[PublicAPI] +[JsonConverter(typeof(JsonStringEnumMemberConverterWithFallback))] +public enum PackageType +{ + Unknown = -1, + [EnumMember(Value = "npm")] + Npm, + [EnumMember(Value = "maven")] + Maven, + [EnumMember(Value = "rubygems")] + RubyGems, + [EnumMember(Value = "docker")] + Docker, + [EnumMember(Value = "nuget")] + NuGet, + [EnumMember(Value = "CONTAINER")] + Container, +} diff --git a/src/Octokit.Webhooks/Models/PackageVersion.cs b/src/Octokit.Webhooks/Models/PackageVersion.cs index c11cc94a..16a32d23 100644 --- a/src/Octokit.Webhooks/Models/PackageVersion.cs +++ b/src/Octokit.Webhooks/Models/PackageVersion.cs @@ -19,57 +19,72 @@ public sealed record PackageVersion public string Description { get; init; } = null!; [JsonPropertyName("body")] - public string Body { get; init; } = null!; + public dynamic? Body { get; init; } [JsonPropertyName("body_html")] - public string BodyHtml { get; init; } = null!; + public string? BodyHtml { get; init; } [JsonPropertyName("release")] - public PackageVersionRelease Release { get; init; } = null!; + public PackageVersionRelease? Release { get; init; } [JsonPropertyName("manifest")] - public string Manifest { get; init; } = null!; + public string? Manifest { get; init; } [JsonPropertyName("html_url")] public string HtmlUrl { get; init; } = null!; [JsonPropertyName("tag_name")] - public string TagName { get; init; } = null!; + public string? TagName { get; init; } [JsonPropertyName("target_commitish")] - public string TargetCommitish { get; init; } = null!; + public string? TargetCommitish { get; init; } [JsonPropertyName("target_oid")] - public string TargetOid { get; init; } = null!; + public string? TargetOid { get; init; } [JsonPropertyName("draft")] - public bool Draft { get; init; } + public bool? Draft { get; init; } [JsonPropertyName("prerelease")] - public bool Prerelease { get; init; } + public bool? Prerelease { get; init; } [JsonPropertyName("created_at")] - [JsonConverter(typeof(DateTimeOffsetConverter))] - public DateTimeOffset CreatedAt { get; init; } + [JsonConverter(typeof(NullableDateTimeOffsetConverter))] + public DateTimeOffset? CreatedAt { get; init; } [JsonPropertyName("updated_at")] - [JsonConverter(typeof(DateTimeOffsetConverter))] - public DateTimeOffset UpdatedAt { get; init; } + [JsonConverter(typeof(NullableDateTimeOffsetConverter))] + public DateTimeOffset? UpdatedAt { get; init; } [JsonPropertyName("metadata")] public IEnumerable Metadata { get; init; } = null!; + [JsonPropertyName("container_metadata")] + public ContainerMetadata? ContainerMetadata { get; init; } + [JsonPropertyName("docker_metadata")] - public IEnumerable DockerMetadata { get; init; } = null!; + public IEnumerable? DockerMetadata { get; init; } + + [JsonPropertyName("npm_metadata")] + public IDictionary? NpmMetadata { get; init; } + + [JsonPropertyName("nuget_metadata")] + public IDictionary? NugetMetadata { get; init; } + + [JsonPropertyName("rubygems_metadata")] + public IDictionary? RubygemsMetadata { get; init; } [JsonPropertyName("package_files")] public IEnumerable PackageFiles { get; init; } = null!; + [JsonPropertyName("package_url")] + public string? PackageUrl { get; init; } + [JsonPropertyName("author")] - public User Author { get; init; } = null!; + public User? Author { get; init; } [JsonPropertyName("source_url")] - public string SourceUrl { get; init; } = null!; + public string? SourceUrl { get; init; } [JsonPropertyName("installation_command")] public string InstallationCommand { get; init; } = null!; diff --git a/src/Octokit.Webhooks/Models/PullRequestReviewComment.cs b/src/Octokit.Webhooks/Models/PullRequestReviewComment.cs index cb218469..ba51005d 100644 --- a/src/Octokit.Webhooks/Models/PullRequestReviewComment.cs +++ b/src/Octokit.Webhooks/Models/PullRequestReviewComment.cs @@ -82,4 +82,7 @@ public sealed record PullRequestReviewComment [JsonPropertyName("in_reply_to_id")] public int? InReplyToId { get; init; } + + [JsonPropertyName("subject_type")] + public PullRequestReviewCommentSubjectType? SubjectType { get; init; } } diff --git a/src/Octokit.Webhooks/Models/PullRequestReviewCommentSubjectType.cs b/src/Octokit.Webhooks/Models/PullRequestReviewCommentSubjectType.cs new file mode 100644 index 00000000..891b9c9f --- /dev/null +++ b/src/Octokit.Webhooks/Models/PullRequestReviewCommentSubjectType.cs @@ -0,0 +1,12 @@ +namespace Octokit.Webhooks.Models; + +[PublicAPI] +[JsonConverter(typeof(JsonStringEnumMemberConverterWithFallback))] +public enum PullRequestReviewCommentSubjectType +{ + Unknown = -1, + [EnumMember(Value = "line")] + Line, + [EnumMember(Value = "file")] + File, +} diff --git a/src/Octokit.Webhooks/Models/Repository.cs b/src/Octokit.Webhooks/Models/Repository.cs index 89fd7461..7d77ff5a 100644 --- a/src/Octokit.Webhooks/Models/Repository.cs +++ b/src/Octokit.Webhooks/Models/Repository.cs @@ -195,6 +195,9 @@ public sealed record Repository [JsonPropertyName("has_pages")] public bool HasPages { get; init; } + [JsonPropertyName("has_discussions")] + public bool? HasDiscussions { get; init; } + [JsonPropertyName("forks_count")] public long ForksCount { get; init; } @@ -249,6 +252,18 @@ public sealed record Repository [JsonPropertyName("use_squash_pr_title_as_default")] public bool? UseSquashPrTitleAsDefault { get; init; } + [JsonPropertyName("squash_merge_commit_message")] + public string? SquashMergeCommitMessage { get; init; } + + [JsonPropertyName("squash_merge_commit_title")] + public string? SquashMergeCommitTitle { get; init; } + + [JsonPropertyName("merge_commit_message")] + public string? MergeCommitMessage { get; init; } + + [JsonPropertyName("merge_commit_title")] + public string? MergeCommitTitle { get; init; } + [JsonPropertyName("is_template")] public bool IsTemplate { get; init; } diff --git a/src/Octokit.Webhooks/Models/SecurityAdvisoryEvent/SecurityAdvisory.cs b/src/Octokit.Webhooks/Models/SecurityAdvisoryEvent/SecurityAdvisory.cs index d708d6e5..1eeb6923 100644 --- a/src/Octokit.Webhooks/Models/SecurityAdvisoryEvent/SecurityAdvisory.cs +++ b/src/Octokit.Webhooks/Models/SecurityAdvisoryEvent/SecurityAdvisory.cs @@ -12,6 +12,9 @@ public sealed record SecurityAdvisory [JsonPropertyName("ghsa_id")] public string GhsaId { get; init; } = null!; + [JsonPropertyName("cve_id")] + public string? CveId { get; init; } + [JsonPropertyName("summary")] public string Summary { get; init; } = null!; diff --git a/src/Octokit.Webhooks/Models/WorkflowJobEvent/WorkflowJob.cs b/src/Octokit.Webhooks/Models/WorkflowJobEvent/WorkflowJob.cs index c8702d02..09dd3c74 100644 --- a/src/Octokit.Webhooks/Models/WorkflowJobEvent/WorkflowJob.cs +++ b/src/Octokit.Webhooks/Models/WorkflowJobEvent/WorkflowJob.cs @@ -62,4 +62,13 @@ public sealed record WorkflowJob [JsonPropertyName("completed_at")] public string? CompletedAt { get; init; } + + [JsonPropertyName("workflow_name")] + public string? WorkflowName { get; init; } + + [JsonPropertyName("head_branch")] + public string? HeadBranch { get; init; } + + [JsonPropertyName("created_at")] + public string CreatedAt { get; init; } = null!; } diff --git a/src/Octokit.Webhooks/WebhookEventProcessor.cs b/src/Octokit.Webhooks/WebhookEventProcessor.cs index 2dfcbcd7..3c79cae4 100644 --- a/src/Octokit.Webhooks/WebhookEventProcessor.cs +++ b/src/Octokit.Webhooks/WebhookEventProcessor.cs @@ -39,6 +39,7 @@ using Octokit.Webhooks.Events.PullRequestReview; using Octokit.Webhooks.Events.PullRequestReviewComment; using Octokit.Webhooks.Events.PullRequestReviewThread; +using Octokit.Webhooks.Events.RegistryPackage; using Octokit.Webhooks.Events.Release; using Octokit.Webhooks.Events.Repository; using Octokit.Webhooks.Events.RepositoryDispatch; @@ -122,6 +123,7 @@ PullRequestReviewThreadEvent pullRequestReviewThreadEvent => this.ProcessPullRequestReviewThreadWebhookAsync(headers, pullRequestReviewThreadEvent), PushEvent pushEvent => this.ProcessPushWebhookAsync(headers, pushEvent), ReleaseEvent releaseEvent => this.ProcessReleaseWebhookAsync(headers, releaseEvent), + RegistryPackageEvent registryPackageEvent => this.ProcessRegistryPackageWebhookAsync(headers, registryPackageEvent), RepositoryEvent repositoryEvent => this.ProcessRepositoryWebhookAsync(headers, repositoryEvent), RepositoryDispatchEvent repositoryDispatchEvent => this.ProcessRepositoryDispatchWebhookAsync(headers, repositoryDispatchEvent), @@ -193,6 +195,7 @@ public virtual WebhookEvent DeserializeWebhookEvent(WebhookHeaders headers, stri WebhookEventType.PullRequestReviewThread => JsonSerializer.Deserialize(body)!, WebhookEventType.Push => JsonSerializer.Deserialize(body)!, WebhookEventType.Release => JsonSerializer.Deserialize(body)!, + WebhookEventType.RegistryPackage => JsonSerializer.Deserialize(body)!, WebhookEventType.Repository => JsonSerializer.Deserialize(body)!, WebhookEventType.RepositoryDispatch => JsonSerializer.Deserialize(body)!, WebhookEventType.RepositoryImport => JsonSerializer.Deserialize(body)!, @@ -930,6 +933,26 @@ private Task ProcessReleaseWebhookAsync(WebhookHeaders headers, ReleaseEvent rel protected virtual Task ProcessReleaseWebhookAsync(WebhookHeaders headers, ReleaseEvent releaseEvent, ReleaseAction action) => Task.CompletedTask; + private Task ProcessRegistryPackageWebhookAsync(WebhookHeaders headers, RegistryPackageEvent registryPackageEvent) => + registryPackageEvent.Action switch + { + RegistryPackageActionValue.Published => this.ProcessRegistryPackageWebhookAsync( + headers, + registryPackageEvent, + RegistryPackageAction.Published), + RegistryPackageActionValue.Updated => this.ProcessRegistryPackageWebhookAsync( + headers, + registryPackageEvent, + RegistryPackageAction.Published), + _ => Task.CompletedTask, + }; + + [PublicAPI] + protected virtual Task ProcessRegistryPackageWebhookAsync( + WebhookHeaders headers, + RegistryPackageEvent registryPackageEvent, + RegistryPackageAction action) => Task.CompletedTask; + private Task ProcessRepositoryWebhookAsync(WebhookHeaders headers, RepositoryEvent repositoryEvent) => repositoryEvent.Action switch { diff --git a/test/Octokit.Webhooks.Test/Resources/content_reference/created.payload.json b/test/Octokit.Webhooks.Test/Resources/content_reference/created.payload.json deleted file mode 100644 index fa774371..00000000 --- a/test/Octokit.Webhooks.Test/Resources/content_reference/created.payload.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "action": "created", - "content_reference": { - "id": 17, - "node_id": "MDE2OkNvbnRlbnRSZWZlcmVuY2UxNjA5", - "reference": "https://errors.ai/" - }, - "repository": { - "id": 145551601, - "node_id": "MDEwOlJlcG9zaXRvcnkxNDU1NTE2MDE=", - "name": "hello-world", - "full_name": "octocoders/hello-world", - "private": true, - "owner": { - "login": "Codertocat", - "id": 7718702, - "node_id": "MDQ6VXNlcjc3MTg3MDI=", - "avatar_url": "https://avatars1.githubusercontent.com/u/7718702?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", - "type": "User", - "site_admin": true - }, - "html_url": "https://github.com/Codertocat/hello-world", - "description": null, - "fork": false, - "url": "https://api.github.com/repos/Codertocat/hello-world", - "forks_url": "https://api.github.com/repos/Codertocat/hello-world/forks", - "keys_url": "https://api.github.com/repos/Codertocat/hello-world/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/Codertocat/hello-world/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/Codertocat/hello-world/teams", - "hooks_url": "https://api.github.com/repos/Codertocat/hello-world/hooks", - "issue_events_url": "https://api.github.com/repos/Codertocat/hello-world/issues/events{/number}", - "events_url": "https://api.github.com/repos/Codertocat/hello-world/events", - "assignees_url": "https://api.github.com/repos/Codertocat/hello-world/assignees{/user}", - "branches_url": "https://api.github.com/repos/Codertocat/hello-world/branches{/branch}", - "tags_url": "https://api.github.com/repos/Codertocat/hello-world/tags", - "blobs_url": "https://api.github.com/repos/Codertocat/hello-world/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/Codertocat/hello-world/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/Codertocat/hello-world/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/Codertocat/hello-world/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/Codertocat/hello-world/statuses/{sha}", - "languages_url": "https://api.github.com/repos/Codertocat/hello-world/languages", - "stargazers_url": "https://api.github.com/repos/Codertocat/hello-world/stargazers", - "contributors_url": "https://api.github.com/repos/Codertocat/hello-world/contributors", - "subscribers_url": "https://api.github.com/repos/Codertocat/hello-world/subscribers", - "subscription_url": "https://api.github.com/repos/Codertocat/hello-world/subscription", - "commits_url": "https://api.github.com/repos/Codertocat/hello-world/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/Codertocat/hello-world/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/Codertocat/hello-world/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/Codertocat/hello-world/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/Codertocat/hello-world/contents/{+path}", - "compare_url": "https://api.github.com/repos/Codertocat/hello-world/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/Codertocat/hello-world/merges", - "archive_url": "https://api.github.com/repos/Codertocat/hello-world/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/Codertocat/hello-world/downloads", - "issues_url": "https://api.github.com/repos/Codertocat/hello-world/issues{/number}", - "pulls_url": "https://api.github.com/repos/Codertocat/hello-world/pulls{/number}", - "milestones_url": "https://api.github.com/repos/Codertocat/hello-world/milestones{/number}", - "notifications_url": "https://api.github.com/repos/Codertocat/hello-world/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/Codertocat/hello-world/labels{/name}", - "releases_url": "https://api.github.com/repos/Codertocat/hello-world/releases{/id}", - "deployments_url": "https://api.github.com/repos/Codertocat/hello-world/deployments", - "created_at": "2018-08-21T10:58:58Z", - "updated_at": "2018-08-21T10:59:01Z", - "pushed_at": "2018-08-21T10:59:00Z", - "git_url": "git://github.com/Codertocat/hello-world.git", - "ssh_url": "git@github.com:Codertocat/hello-world.git", - "clone_url": "https://github.com/Codertocat/hello-world.git", - "svn_url": "https://github.com/Codertocat/hello-world", - "homepage": null, - "size": 0, - "stargazers_count": 0, - "watchers_count": 0, - "language": null, - "has_issues": true, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": false, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "open_issues_count": 2, - "license": null, - "forks": 0, - "open_issues": 2, - "watchers": 0, - "default_branch": "master" - }, - "sender": { - "login": "Codertocat", - "id": 7718702, - "node_id": "MDQ6VXNlcjc3MTg3MDI=", - "avatar_url": "https://avatars1.githubusercontent.com/u/7718702?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", - "type": "User", - "site_admin": true - }, - "installation": { - "id": 371641, - "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMzcxNjQx" - } -} diff --git a/test/Octokit.Webhooks.Test/Resources/merge_group/checks_requested.payload.json b/test/Octokit.Webhooks.Test/Resources/merge_group/checks_requested.payload.json index fc4eb7a9..15a5e744 100644 --- a/test/Octokit.Webhooks.Test/Resources/merge_group/checks_requested.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/merge_group/checks_requested.payload.json @@ -3,7 +3,22 @@ "merge_group": { "head_sha": "2ffea6db159f6b6c47a24e778fb9ef40cf6b1c7d", "head_ref": "refs/heads/gh-readonly-queue/main/pr-104-929f8209d40f77f4abc622a499c93a83babdbe64", - "base_ref": "refs/heads/main" + "base_sha": "380387fbc80638b734a49e1be1c4dfec1c01b33c", + "base_ref": "refs/heads/main", + "head_commit": { + "id": "ec26c3e57ca3a959ca5aad62de7213c562f8c821", + "tree_id": "31b122c26a97cf9af023e9ddab94a82c6e77b0ea", + "message": "Merge pull request #2048 from octo-repo/update-readme\n\nUpdate README.md", + "timestamp": "2019-05-15T15:20:30Z", + "author": { + "name": "Codertocat", + "email": "21031067+Codertocat@users.noreply.github.com" + }, + "committer": { + "name": "Codertocat", + "email": "21031067+Codertocat@users.noreply.github.com" + } + } }, "repository": { "id": 17273051, @@ -97,7 +112,11 @@ "forks": 0, "open_issues": 39, "watchers": 0, - "default_branch": "main" + "default_branch": "main", + "is_template": false, + "web_commit_signoff_required": false, + "topics": [], + "visibility": "public" }, "organization": { "login": "octo-org", @@ -133,8 +152,5 @@ "type": "User", "site_admin": false }, - "installation": { - "id": 1, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=" - } + "installation": { "id": 1, "node_id": "MDEyOk9yZ2FuaXphdGlvbjY4MTE2NzI=" } } diff --git a/test/Octokit.Webhooks.Test/Resources/organization/renamed.payload.json b/test/Octokit.Webhooks.Test/Resources/organization/renamed.payload.json new file mode 100644 index 00000000..91d68d24 --- /dev/null +++ b/test/Octokit.Webhooks.Test/Resources/organization/renamed.payload.json @@ -0,0 +1,42 @@ +{ + "action": "renamed", + "changes": { "login": { "from": "Octocoders" } }, + "organization": { + "login": "Octocoders", + "id": 38302899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5", + "url": "https://api.github.com/orgs/Octocoders", + "repos_url": "https://api.github.com/orgs/Octocoders/repos", + "events_url": "https://api.github.com/orgs/Octocoders/events", + "hooks_url": "https://api.github.com/orgs/Octocoders/hooks", + "issues_url": "https://api.github.com/orgs/Octocoders/issues", + "members_url": "https://api.github.com/orgs/Octocoders/members{/member}", + "public_members_url": "https://api.github.com/orgs/Octocoders/public_members{/member}", + "avatar_url": "https://avatars1.githubusercontent.com/u/38302899?v=4", + "description": "" + }, + "sender": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "id": 1, + "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMQ==" + } +} diff --git a/test/Octokit.Webhooks.Test/Resources/package/published.docker.payload.json b/test/Octokit.Webhooks.Test/Resources/package/published.docker.payload.json new file mode 100644 index 00000000..c0338063 --- /dev/null +++ b/test/Octokit.Webhooks.Test/Resources/package/published.docker.payload.json @@ -0,0 +1,374 @@ +{ + "action": "published", + "package": { + "id": 10696, + "name": "hello-world-npm", + "namespace": "Codertocat/hello-world", + "description": null, + "ecosystem": "docker", + "package_type": "npm", + "html_url": "https://github.com/Codertocat/hello-world/packages/10696", + "created_at": "2019-05-09T23:28:29Z", + "updated_at": "2019-05-09T23:28:29Z", + "owner": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + }, + "package_version": { + "id": 57755790, + "version": "sha256:3da1996a8115d7616457760d9920b815241d0a03b34cf5f04e9a0e9d8de37498", + "name": "sha256:3da1996a8115d7616457760d9920b815241d0a03b34cf5f04e9a0e9d8de37498", + "description": "Hello-World in a docker container", + "summary": "Hello-World in a docker container", + "body": { + "repository": { + "repository": { + "id": 185882436, + "node_id": "MDEwOlJlcG9zaXRvcnkxODU4ODI0MzY=", + "name": "hello-world-npm", + "full_name": "Codertocat/hello-world-npm", + "private": true, + "owner": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/Codertocat/hello-world-npm", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Codertocat/hello-world-npm", + "forks_url": "https://api.github.com/repos/Codertocat/hello-world-npm/forks", + "keys_url": "https://api.github.com/repos/Codertocat/hello-world-npm/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Codertocat/hello-world-npm/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Codertocat/hello-world-npm/teams", + "hooks_url": "https://api.github.com/repos/Codertocat/hello-world-npm/hooks", + "issue_events_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues/events{/number}", + "events_url": "https://api.github.com/repos/Codertocat/hello-world-npm/events", + "assignees_url": "https://api.github.com/repos/Codertocat/hello-world-npm/assignees{/user}", + "branches_url": "https://api.github.com/repos/Codertocat/hello-world-npm/branches{/branch}", + "tags_url": "https://api.github.com/repos/Codertocat/hello-world-npm/tags", + "blobs_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Codertocat/hello-world-npm/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Codertocat/hello-world-npm/languages", + "stargazers_url": "https://api.github.com/repos/Codertocat/hello-world-npm/stargazers", + "contributors_url": "https://api.github.com/repos/Codertocat/hello-world-npm/contributors", + "subscribers_url": "https://api.github.com/repos/Codertocat/hello-world-npm/subscribers", + "subscription_url": "https://api.github.com/repos/Codertocat/hello-world-npm/subscription", + "commits_url": "https://api.github.com/repos/Codertocat/hello-world-npm/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Codertocat/hello-world-npm/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Codertocat/hello-world-npm/contents/{+path}", + "compare_url": "https://api.github.com/repos/Codertocat/hello-world-npm/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Codertocat/hello-world-npm/merges", + "archive_url": "https://api.github.com/repos/Codertocat/hello-world-npm/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Codertocat/hello-world-npm/downloads", + "issues_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues{/number}", + "pulls_url": "https://api.github.com/repos/Codertocat/hello-world-npm/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Codertocat/hello-world-npm/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Codertocat/hello-world-npm/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Codertocat/hello-world-npm/labels{/name}", + "releases_url": "https://api.github.com/repos/Codertocat/hello-world-npm/releases{/id}", + "deployments_url": "https://api.github.com/repos/Codertocat/hello-world-npm/deployments", + "created_at": "2019-05-09T22:53:26Z", + "updated_at": "2019-05-09T23:24:42Z", + "pushed_at": "2019-05-09T23:27:00Z", + "git_url": "git://github.com/Codertocat/hello-world-npm.git", + "ssh_url": "git@github.com:Codertocat/hello-world-npm.git", + "clone_url": "https://github.com/Codertocat/hello-world-npm.git", + "svn_url": "https://github.com/Codertocat/hello-world-npm", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "is_template": false, + "topics": [], + "visibility": "public", + "web_commit_signoff_required": false + } + }, + "info": { + "type": "blob", + "oid": "326b0e08c815245a11be4b399c51e419f334f569", + "mode": 33188, + "name": "README.md", + "path": "README.md", + "size": null, + "collection": true + }, + "attributes": {}, + "_formatted": true + }, + "manifest": "", + "html_url": "https://github.com/Codertocat/container/hello-world/10696", + "target_commitish": "master", + "target_oid": "6c62fb45fe66bfb1ea9a66abc38f6a0cc974292b", + "created_at": "0001-01-01T00:00:00Z", + "updated_at": "0001-01-01T00:00:00Z", + "metadata": [], + "container_metadata": { + "tag": { + "name": "", + "digest": "sha256:6c62fb45fe66bfb1ea9a66abc38f6a0cc974292b" + }, + "labels": { + "description": "Hello-World in a docker container", + "source": "https://github.com/Codertocat/hello-world", + "revision": "", + "image_url": "https://github.com/Codertocat/hello-world", + "licenses": "", + "all_labels": { + "org.opencontainers.image.url": "https://github.com/Codertocat/hello-world", + "org.opencontainers.image.licenses": "", + "org.opencontainers.image.title": "docker-hello-world", + "org.opencontainers.image.revision": "6c62fb45fe66bfb1ea9a66abc38f6a0cc974292b", + "org.opencontainers.image.created": "2019-05-09T23:28:29Z", + "org.opencontainers.image.version": "nightly", + "org.opencontainers.image.description": "Hello-World in a docker container", + "org.opencontainers.image.source": "https://github.com/Codertocat/hello-world" + } + }, + "manifest": { + "digest": "sha256:6c62fb45fe66bfb1ea9a66abc38f6a0cc974292b", + "media_type": "application/vnd.docker.distribution.manifest.v2+json", + "uri": "repositories/Codertocat/hello-world/manifests/sha256:6c62fb45fe66bfb1ea9a66abc38f6a0cc974292b", + "size": 1782, + "config": { + "digest": "sha256:37e1478a8ffb0513113dbbb172bfafdf56ba24014a671921a2593d83da7a0608", + "media_type": "application/vnd.docker.container.image.v1+json", + "size": 7205 + }, + "layers": [ + { + "digest": "sha256:fd18d0201d0ce0c5e103902d894f5d601fc5dde76688aa7dae786840141d23e4", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 26576195 + }, + { + "digest": "sha256:0fa20a868a60ceb7bc8a95981a4bd56fac4c2d9de1f8745eae546146e48a8e0f", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 51166445 + }, + { + "digest": "sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 32 + }, + { + "digest": "sha256:2ad7497455cdab76764a94c36fa2fc898c146b4d996bbd01beda28ca303e8a62", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 130 + }, + { + "digest": "sha256:f09600ea01bd4ba5ef2a7d3690c7d46147b924e680cc9034194263b86f3d6bd7", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 12202 + }, + { + "digest": "sha256:783c2f94749191f27129ee0bb80ff4db26f49af8a82aa67c85fc9444ce189d0c", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 727 + }, + { + "digest": "sha256:3d98f361b22ebdff75986009b3077e5590d90ea81c9df95d0cf9e311436add74", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 41670773 + } + ] + } + }, + "package_files": [], + "installation_command": "docker pull ghcr.io/Codertocat/hello-world:", + "package_url": "ghcr.io/Codertocat/hello-world:" + }, + "registry": { + "about_url": "https://docs.github.com/packages/learn-github-packages/introduction-to-github-packages", + "name": "GitHub CONTAINER registry", + "type": "CONTAINER", + "url": "https://CONTAINER.pkg.github.com/Codertocat", + "vendor": "GitHub Inc" + } + }, + "organization": { + "login": "Octocoders", + "id": 38302899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5", + "url": "https://api.github.com/orgs/Octocoders", + "repos_url": "https://api.github.com/orgs/Octocoders/repos", + "events_url": "https://api.github.com/orgs/Octocoders/events", + "hooks_url": "https://api.github.com/orgs/Octocoders/hooks", + "issues_url": "https://api.github.com/orgs/Octocoders/issues", + "members_url": "https://api.github.com/orgs/Octocoders/members{/member}", + "public_members_url": "https://api.github.com/orgs/Octocoders/public_members{/member}", + "avatar_url": "https://avatars1.githubusercontent.com/u/38302899?v=4", + "description": "" + }, + "repository": { + "id": 185882436, + "node_id": "MDEwOlJlcG9zaXRvcnkxODU4ODI0MzY=", + "name": "hello-world-npm", + "full_name": "Codertocat/hello-world-npm", + "private": true, + "owner": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/Codertocat/hello-world-npm", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Codertocat/hello-world-npm", + "forks_url": "https://api.github.com/repos/Codertocat/hello-world-npm/forks", + "keys_url": "https://api.github.com/repos/Codertocat/hello-world-npm/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Codertocat/hello-world-npm/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Codertocat/hello-world-npm/teams", + "hooks_url": "https://api.github.com/repos/Codertocat/hello-world-npm/hooks", + "issue_events_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues/events{/number}", + "events_url": "https://api.github.com/repos/Codertocat/hello-world-npm/events", + "assignees_url": "https://api.github.com/repos/Codertocat/hello-world-npm/assignees{/user}", + "branches_url": "https://api.github.com/repos/Codertocat/hello-world-npm/branches{/branch}", + "tags_url": "https://api.github.com/repos/Codertocat/hello-world-npm/tags", + "blobs_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Codertocat/hello-world-npm/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Codertocat/hello-world-npm/languages", + "stargazers_url": "https://api.github.com/repos/Codertocat/hello-world-npm/stargazers", + "contributors_url": "https://api.github.com/repos/Codertocat/hello-world-npm/contributors", + "subscribers_url": "https://api.github.com/repos/Codertocat/hello-world-npm/subscribers", + "subscription_url": "https://api.github.com/repos/Codertocat/hello-world-npm/subscription", + "commits_url": "https://api.github.com/repos/Codertocat/hello-world-npm/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Codertocat/hello-world-npm/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Codertocat/hello-world-npm/contents/{+path}", + "compare_url": "https://api.github.com/repos/Codertocat/hello-world-npm/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Codertocat/hello-world-npm/merges", + "archive_url": "https://api.github.com/repos/Codertocat/hello-world-npm/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Codertocat/hello-world-npm/downloads", + "issues_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues{/number}", + "pulls_url": "https://api.github.com/repos/Codertocat/hello-world-npm/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Codertocat/hello-world-npm/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Codertocat/hello-world-npm/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Codertocat/hello-world-npm/labels{/name}", + "releases_url": "https://api.github.com/repos/Codertocat/hello-world-npm/releases{/id}", + "deployments_url": "https://api.github.com/repos/Codertocat/hello-world-npm/deployments", + "created_at": "2019-05-09T22:53:26Z", + "updated_at": "2019-05-09T23:24:42Z", + "pushed_at": "2019-05-09T23:27:00Z", + "git_url": "git://github.com/Codertocat/hello-world-npm.git", + "ssh_url": "git@github.com:Codertocat/hello-world-npm.git", + "clone_url": "https://github.com/Codertocat/hello-world-npm.git", + "svn_url": "https://github.com/Codertocat/hello-world-npm", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "is_template": false, + "topics": [], + "visibility": "public", + "web_commit_signoff_required": false + }, + "sender": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + } +} diff --git a/test/Octokit.Webhooks.Test/Resources/package/published.payload.json b/test/Octokit.Webhooks.Test/Resources/package/published.npm.payload.json similarity index 100% rename from test/Octokit.Webhooks.Test/Resources/package/published.payload.json rename to test/Octokit.Webhooks.Test/Resources/package/published.npm.payload.json diff --git a/test/Octokit.Webhooks.Test/Resources/registry_package/published.docker.payload.json b/test/Octokit.Webhooks.Test/Resources/registry_package/published.docker.payload.json new file mode 100644 index 00000000..08b0ddb5 --- /dev/null +++ b/test/Octokit.Webhooks.Test/Resources/registry_package/published.docker.payload.json @@ -0,0 +1,374 @@ +{ + "action": "published", + "registry_package": { + "id": 10696, + "name": "hello-world-npm", + "namespace": "Codertocat/hello-world", + "description": null, + "ecosystem": "docker", + "package_type": "npm", + "html_url": "https://github.com/Codertocat/hello-world/packages/10696", + "created_at": "2019-05-09T23:28:29Z", + "updated_at": "2019-05-09T23:28:29Z", + "owner": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + }, + "package_version": { + "id": 57755791, + "version": "sha256:3da1996a8115d7616457760d9920b815241d0a03b34cf5f04e9a0e9d8de37498", + "name": "sha256:3da1996a8115d7616457760d9920b815241d0a03b34cf5f04e9a0e9d8de37498", + "description": "Hello-World in a docker container", + "summary": "Hello-World in a docker container", + "body": { + "repository": { + "repository": { + "id": 185882436, + "node_id": "MDEwOlJlcG9zaXRvcnkxODU4ODI0MzY=", + "name": "hello-world-npm", + "full_name": "Codertocat/hello-world-npm", + "private": true, + "owner": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/Codertocat/hello-world-npm", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Codertocat/hello-world-npm", + "forks_url": "https://api.github.com/repos/Codertocat/hello-world-npm/forks", + "keys_url": "https://api.github.com/repos/Codertocat/hello-world-npm/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Codertocat/hello-world-npm/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Codertocat/hello-world-npm/teams", + "hooks_url": "https://api.github.com/repos/Codertocat/hello-world-npm/hooks", + "issue_events_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues/events{/number}", + "events_url": "https://api.github.com/repos/Codertocat/hello-world-npm/events", + "assignees_url": "https://api.github.com/repos/Codertocat/hello-world-npm/assignees{/user}", + "branches_url": "https://api.github.com/repos/Codertocat/hello-world-npm/branches{/branch}", + "tags_url": "https://api.github.com/repos/Codertocat/hello-world-npm/tags", + "blobs_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Codertocat/hello-world-npm/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Codertocat/hello-world-npm/languages", + "stargazers_url": "https://api.github.com/repos/Codertocat/hello-world-npm/stargazers", + "contributors_url": "https://api.github.com/repos/Codertocat/hello-world-npm/contributors", + "subscribers_url": "https://api.github.com/repos/Codertocat/hello-world-npm/subscribers", + "subscription_url": "https://api.github.com/repos/Codertocat/hello-world-npm/subscription", + "commits_url": "https://api.github.com/repos/Codertocat/hello-world-npm/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Codertocat/hello-world-npm/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Codertocat/hello-world-npm/contents/{+path}", + "compare_url": "https://api.github.com/repos/Codertocat/hello-world-npm/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Codertocat/hello-world-npm/merges", + "archive_url": "https://api.github.com/repos/Codertocat/hello-world-npm/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Codertocat/hello-world-npm/downloads", + "issues_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues{/number}", + "pulls_url": "https://api.github.com/repos/Codertocat/hello-world-npm/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Codertocat/hello-world-npm/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Codertocat/hello-world-npm/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Codertocat/hello-world-npm/labels{/name}", + "releases_url": "https://api.github.com/repos/Codertocat/hello-world-npm/releases{/id}", + "deployments_url": "https://api.github.com/repos/Codertocat/hello-world-npm/deployments", + "created_at": "2019-05-09T22:53:26Z", + "updated_at": "2019-05-09T23:24:42Z", + "pushed_at": "2019-05-09T23:27:00Z", + "git_url": "git://github.com/Codertocat/hello-world-npm.git", + "ssh_url": "git@github.com:Codertocat/hello-world-npm.git", + "clone_url": "https://github.com/Codertocat/hello-world-npm.git", + "svn_url": "https://github.com/Codertocat/hello-world-npm", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "is_template": false, + "topics": [], + "visibility": "public", + "web_commit_signoff_required": false + } + }, + "info": { + "type": "blob", + "oid": "326b0e08c815245a11be4b399c51e419f334f569", + "mode": 33188, + "name": "README.md", + "path": "README.md", + "size": null, + "collection": true + }, + "attributes": {}, + "_formatted": true + }, + "manifest": "", + "html_url": "https://github.com/orgs/Codertocat/packages/container/hello-world/57755791", + "target_commitish": "master", + "target_oid": "3da1996a8115d7616457760d9920b815241d0a03b34cf5f04e9a0e9d8de37498", + "created_at": "0001-01-01T00:00:00Z", + "updated_at": "0001-01-01T00:00:00Z", + "metadata": [], + "container_metadata": { + "tag": { + "name": "", + "digest": "sha256:6c62fb45fe66bfb1ea9a66abc38f6a0cc974292b" + }, + "labels": { + "description": "Hello-World in a docker container", + "source": "https://github.com/Codertocat/hello-world", + "revision": "", + "image_url": "https://github.com/Codertocat/hello-world", + "licenses": "", + "all_labels": { + "org.opencontainers.image.url": "https://github.com/Codertocat/hello-world", + "org.opencontainers.image.licenses": "", + "org.opencontainers.image.title": "docker-hello-world", + "org.opencontainers.image.revision": "6c62fb45fe66bfb1ea9a66abc38f6a0cc974292b", + "org.opencontainers.image.created": "2019-05-09T23:28:29Z", + "org.opencontainers.image.version": "nightly", + "org.opencontainers.image.description": "Hello-World in a docker container", + "org.opencontainers.image.source": "https://github.com/Codertocat/hello-world" + } + }, + "manifest": { + "digest": "sha256:6c62fb45fe66bfb1ea9a66abc38f6a0cc974292b", + "media_type": "application/vnd.docker.distribution.manifest.v2+json", + "uri": "repositories/Codertocat/hello-world/manifests/sha256:6c62fb45fe66bfb1ea9a66abc38f6a0cc974292b", + "size": 1782, + "config": { + "digest": "sha256:37e1478a8ffb0513113dbbb172bfafdf56ba24014a671921a2593d83da7a0608", + "media_type": "application/vnd.docker.container.image.v1+json", + "size": 7205 + }, + "layers": [ + { + "digest": "sha256:fd18d0201d0ce0c5e103902d894f5d601fc5dde76688aa7dae786840141d23e4", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 26576195 + }, + { + "digest": "sha256:0fa20a868a60ceb7bc8a95981a4bd56fac4c2d9de1f8745eae546146e48a8e0f", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 51166445 + }, + { + "digest": "sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 32 + }, + { + "digest": "sha256:2ad7497455cdab76764a94c36fa2fc898c146b4d996bbd01beda28ca303e8a62", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 130 + }, + { + "digest": "sha256:f09600ea01bd4ba5ef2a7d3690c7d46147b924e680cc9034194263b86f3d6bd7", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 12202 + }, + { + "digest": "sha256:783c2f94749191f27129ee0bb80ff4db26f49af8a82aa67c85fc9444ce189d0c", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 727 + }, + { + "digest": "sha256:3d98f361b22ebdff75986009b3077e5590d90ea81c9df95d0cf9e311436add74", + "media_type": "application/vnd.docker.image.rootfs.diff.tar.gzip", + "size": 41670773 + } + ] + } + }, + "package_files": [], + "installation_command": "docker pull ghcr.io/Codertocat/hello-world:", + "package_url": "ghcr.io/Codertocat/hello-world:" + }, + "registry": { + "about_url": "https://docs.github.com/packages/learn-github-packages/introduction-to-github-packages", + "name": "GitHub CONTAINER registry", + "type": "CONTAINER", + "url": "https://CONTAINER.pkg.github.com/Codertocat", + "vendor": "GitHub Inc" + } + }, + "repository": { + "id": 185882436, + "node_id": "MDEwOlJlcG9zaXRvcnkxODU4ODI0MzY=", + "name": "hello-world-npm", + "full_name": "Codertocat/hello-world-npm", + "private": true, + "owner": { + "login": "Codertocat", + "id": 21031067, + "node_id": "MDQ6VXNlcjIxMDMxMDY3", + "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/Codertocat", + "html_url": "https://github.com/Codertocat", + "followers_url": "https://api.github.com/users/Codertocat/followers", + "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", + "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", + "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", + "organizations_url": "https://api.github.com/users/Codertocat/orgs", + "repos_url": "https://api.github.com/users/Codertocat/repos", + "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", + "received_events_url": "https://api.github.com/users/Codertocat/received_events", + "type": "User", + "site_admin": false + }, + "html_url": "https://github.com/Codertocat/hello-world-npm", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/Codertocat/hello-world-npm", + "forks_url": "https://api.github.com/repos/Codertocat/hello-world-npm/forks", + "keys_url": "https://api.github.com/repos/Codertocat/hello-world-npm/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/Codertocat/hello-world-npm/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/Codertocat/hello-world-npm/teams", + "hooks_url": "https://api.github.com/repos/Codertocat/hello-world-npm/hooks", + "issue_events_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues/events{/number}", + "events_url": "https://api.github.com/repos/Codertocat/hello-world-npm/events", + "assignees_url": "https://api.github.com/repos/Codertocat/hello-world-npm/assignees{/user}", + "branches_url": "https://api.github.com/repos/Codertocat/hello-world-npm/branches{/branch}", + "tags_url": "https://api.github.com/repos/Codertocat/hello-world-npm/tags", + "blobs_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/Codertocat/hello-world-npm/statuses/{sha}", + "languages_url": "https://api.github.com/repos/Codertocat/hello-world-npm/languages", + "stargazers_url": "https://api.github.com/repos/Codertocat/hello-world-npm/stargazers", + "contributors_url": "https://api.github.com/repos/Codertocat/hello-world-npm/contributors", + "subscribers_url": "https://api.github.com/repos/Codertocat/hello-world-npm/subscribers", + "subscription_url": "https://api.github.com/repos/Codertocat/hello-world-npm/subscription", + "commits_url": "https://api.github.com/repos/Codertocat/hello-world-npm/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/Codertocat/hello-world-npm/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/Codertocat/hello-world-npm/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/Codertocat/hello-world-npm/contents/{+path}", + "compare_url": "https://api.github.com/repos/Codertocat/hello-world-npm/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/Codertocat/hello-world-npm/merges", + "archive_url": "https://api.github.com/repos/Codertocat/hello-world-npm/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/Codertocat/hello-world-npm/downloads", + "issues_url": "https://api.github.com/repos/Codertocat/hello-world-npm/issues{/number}", + "pulls_url": "https://api.github.com/repos/Codertocat/hello-world-npm/pulls{/number}", + "milestones_url": "https://api.github.com/repos/Codertocat/hello-world-npm/milestones{/number}", + "notifications_url": "https://api.github.com/repos/Codertocat/hello-world-npm/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/Codertocat/hello-world-npm/labels{/name}", + "releases_url": "https://api.github.com/repos/Codertocat/hello-world-npm/releases{/id}", + "deployments_url": "https://api.github.com/repos/Codertocat/hello-world-npm/deployments", + "created_at": "2019-05-09T22:53:26Z", + "updated_at": "2019-05-09T23:24:42Z", + "pushed_at": "2019-05-09T23:27:00Z", + "git_url": "git://github.com/Codertocat/hello-world-npm.git", + "ssh_url": "git@github.com:Codertocat/hello-world-npm.git", + "clone_url": "https://github.com/Codertocat/hello-world-npm.git", + "svn_url": "https://github.com/Codertocat/hello-world-npm", + "homepage": null, + "size": 0, + "stargazers_count": 0, + "watchers_count": 0, + "language": "JavaScript", + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": true, + "has_pages": false, + "forks_count": 0, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 0, + "license": null, + "forks": 0, + "open_issues": 0, + "watchers": 0, + "default_branch": "master", + "is_template": false, + "topics": [], + "visibility": "public", + "web_commit_signoff_required": false + }, + "organization": { + "login": "Octocoders", + "id": 38302899, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjM4MzAyODk5", + "url": "https://api.github.com/orgs/Octocoders", + "repos_url": "https://api.github.com/orgs/Octocoders/repos", + "events_url": "https://api.github.com/orgs/Octocoders/events", + "hooks_url": "https://api.github.com/orgs/Octocoders/hooks", + "issues_url": "https://api.github.com/orgs/Octocoders/issues", + "members_url": "https://api.github.com/orgs/Octocoders/members{/member}", + "public_members_url": "https://api.github.com/orgs/Octocoders/public_members{/member}", + "avatar_url": "https://avatars1.githubusercontent.com/u/38302899?v=4", + "description": "" + }, + "sender": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + } +} diff --git a/test/Octokit.Webhooks.Test/Resources/repository_vulnerability_alert/create.with-gh-alert.payload.json b/test/Octokit.Webhooks.Test/Resources/repository_vulnerability_alert/create.with-gh-alert.payload.json deleted file mode 100644 index 973de274..00000000 --- a/test/Octokit.Webhooks.Test/Resources/repository_vulnerability_alert/create.with-gh-alert.payload.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "action": "create", - "alert": { - "id": 439963761, - "node_id": "MDU6SXNzdWU0Mzk5NjM2MjE=", - "affected_range": "< 1.3.6", - "affected_package_name": "ini", - "external_reference": "https://github.com/npm/ini/commit/56d2805e07ccd94e2ba0984ac9240ff02d44b6f1", - "external_identifier": "GHSA-qqgx-2p2h-9c37", - "ghsa_id": "GHSA-qqgx-2p2h-9c37", - "created_at": "2020-12-12T14:26:49Z", - "fixed_in": "1.3.6" - }, - "repository": { - "id": 186853002, - "node_id": "MDEwOlJlcG9zaXRvcnkxODY4NTMwMDI=", - "name": "Hello-World", - "full_name": "Codertocat/Hello-World", - "private": false, - "owner": { - "login": "Codertocat", - "id": 21031067, - "node_id": "MDQ6VXNlcjIxMDMxMDY3", - "avatar_url": "https://avatars1.githubusercontent.com/u/21031067?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/Codertocat", - "html_url": "https://github.com/Codertocat", - "followers_url": "https://api.github.com/users/Codertocat/followers", - "following_url": "https://api.github.com/users/Codertocat/following{/other_user}", - "gists_url": "https://api.github.com/users/Codertocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/Codertocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/Codertocat/subscriptions", - "organizations_url": "https://api.github.com/users/Codertocat/orgs", - "repos_url": "https://api.github.com/users/Codertocat/repos", - "events_url": "https://api.github.com/users/Codertocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/Codertocat/received_events", - "type": "User", - "site_admin": false - }, - "html_url": "https://github.com/Codertocat/Hello-World", - "description": null, - "fork": false, - "url": "https://api.github.com/repos/Codertocat/Hello-World", - "forks_url": "https://api.github.com/repos/Codertocat/Hello-World/forks", - "keys_url": "https://api.github.com/repos/Codertocat/Hello-World/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/Codertocat/Hello-World/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/Codertocat/Hello-World/teams", - "hooks_url": "https://api.github.com/repos/Codertocat/Hello-World/hooks", - "issue_events_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/events{/number}", - "events_url": "https://api.github.com/repos/Codertocat/Hello-World/events", - "assignees_url": "https://api.github.com/repos/Codertocat/Hello-World/assignees{/user}", - "branches_url": "https://api.github.com/repos/Codertocat/Hello-World/branches{/branch}", - "tags_url": "https://api.github.com/repos/Codertocat/Hello-World/tags", - "blobs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/Codertocat/Hello-World/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/Codertocat/Hello-World/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/Codertocat/Hello-World/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/statuses/{sha}", - "languages_url": "https://api.github.com/repos/Codertocat/Hello-World/languages", - "stargazers_url": "https://api.github.com/repos/Codertocat/Hello-World/stargazers", - "contributors_url": "https://api.github.com/repos/Codertocat/Hello-World/contributors", - "subscribers_url": "https://api.github.com/repos/Codertocat/Hello-World/subscribers", - "subscription_url": "https://api.github.com/repos/Codertocat/Hello-World/subscription", - "commits_url": "https://api.github.com/repos/Codertocat/Hello-World/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/Codertocat/Hello-World/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/Codertocat/Hello-World/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/Codertocat/Hello-World/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/Codertocat/Hello-World/contents/{+path}", - "compare_url": "https://api.github.com/repos/Codertocat/Hello-World/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/Codertocat/Hello-World/merges", - "archive_url": "https://api.github.com/repos/Codertocat/Hello-World/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/Codertocat/Hello-World/downloads", - "issues_url": "https://api.github.com/repos/Codertocat/Hello-World/issues{/number}", - "pulls_url": "https://api.github.com/repos/Codertocat/Hello-World/pulls{/number}", - "milestones_url": "https://api.github.com/repos/Codertocat/Hello-World/milestones{/number}", - "notifications_url": "https://api.github.com/repos/Codertocat/Hello-World/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/Codertocat/Hello-World/labels{/name}", - "releases_url": "https://api.github.com/repos/Codertocat/Hello-World/releases{/id}", - "deployments_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments", - "created_at": "2019-05-15T15:19:25Z", - "updated_at": "2019-05-15T15:19:27Z", - "pushed_at": "2019-05-15T15:20:32Z", - "git_url": "git://github.com/Codertocat/Hello-World.git", - "ssh_url": "git@github.com:Codertocat/Hello-World.git", - "clone_url": "https://github.com/Codertocat/Hello-World.git", - "svn_url": "https://github.com/Codertocat/Hello-World", - "homepage": null, - "size": 0, - "stargazers_count": 0, - "watchers_count": 0, - "language": null, - "has_issues": true, - "has_projects": true, - "has_downloads": true, - "has_wiki": true, - "has_pages": true, - "forks_count": 0, - "mirror_url": null, - "archived": false, - "disabled": false, - "open_issues_count": 2, - "license": null, - "forks": 0, - "open_issues": 2, - "watchers": 0, - "default_branch": "master", - "is_template": false, - "topics": [], - "visibility": "public" - }, - "sender": { - "login": "github", - "id": 9919, - "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=", - "avatar_url": "https://avatars1.githubusercontent.com/u/9919?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github", - "html_url": "https://github.com/github", - "followers_url": "https://api.github.com/users/github/followers", - "following_url": "https://api.github.com/users/github/following{/other_user}", - "gists_url": "https://api.github.com/users/github/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github/subscriptions", - "organizations_url": "https://api.github.com/users/github/orgs", - "repos_url": "https://api.github.com/users/github/repos", - "events_url": "https://api.github.com/users/github/events{/privacy}", - "received_events_url": "https://api.github.com/users/github/received_events", - "type": "Organization", - "site_admin": false - } -} diff --git a/test/Octokit.Webhooks.Test/Resources/security_advisory/published.payload.json b/test/Octokit.Webhooks.Test/Resources/security_advisory/published.payload.json index 333d1d6d..42996f79 100644 --- a/test/Octokit.Webhooks.Test/Resources/security_advisory/published.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/security_advisory/published.payload.json @@ -28,6 +28,7 @@ } ], "cvss": { "vector_string": "", "score": 7.9 }, - "cwes": [{ "cwe_id": "CWE-0000", "name": "" }] + "cwes": [{ "cwe_id": "CWE-0000", "name": "" }], + "cve_id": null } } diff --git a/test/Octokit.Webhooks.Test/Resources/security_advisory/updated.payload.json b/test/Octokit.Webhooks.Test/Resources/security_advisory/updated.payload.json index dfc6f03a..c17caec6 100644 --- a/test/Octokit.Webhooks.Test/Resources/security_advisory/updated.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/security_advisory/updated.payload.json @@ -25,6 +25,7 @@ } ], "cvss": { "vector_string": "", "score": 7.9 }, - "cwes": [{ "cwe_id": "CWE-0000", "name": "" }] + "cwes": [{ "cwe_id": "CWE-0000", "name": "" }], + "cve_id": "CVE-2019-5438" } } diff --git a/test/Octokit.Webhooks.Test/Resources/security_advisory/withdrawn.payload.json b/test/Octokit.Webhooks.Test/Resources/security_advisory/withdrawn.payload.json index f3a1087d..b7a90a05 100644 --- a/test/Octokit.Webhooks.Test/Resources/security_advisory/withdrawn.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/security_advisory/withdrawn.payload.json @@ -33,6 +33,7 @@ "cwe_id": "CWE-94", "name": "Improper Control of Generation of Code ('Code Injection')" } - ] + ], + "cve_id": "CVE-2021-23334" } } diff --git a/test/Octokit.Webhooks.Test/Resources/workflow_job/completed.failure.with-organization.payload.json b/test/Octokit.Webhooks.Test/Resources/workflow_job/completed.failure.with-organization.payload.json index b20a8853..c42acd75 100644 --- a/test/Octokit.Webhooks.Test/Resources/workflow_job/completed.failure.with-organization.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/workflow_job/completed.failure.with-organization.payload.json @@ -7,12 +7,14 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "completed", "conclusion": "failure", "started_at": "2021-08-05T10:34:58Z", "completed_at": "2021-08-05T10:38:16Z", + "created_at": "2021-08-05T10:33:58Z", "name": "linters", "steps": [ { @@ -117,7 +119,8 @@ "runner_id": 5, "runner_name": "GitHub Actions 5", "runner_group_id": 2, - "runner_group_name": "GitHub Actions" + "runner_group_name": "GitHub Actions", + "workflow_name": "CodeQL" }, "repository": { "id": 186853002, diff --git a/test/Octokit.Webhooks.Test/Resources/workflow_job/completed.success.with-organization.payload.json b/test/Octokit.Webhooks.Test/Resources/workflow_job/completed.success.with-organization.payload.json index 5f24db2e..4db5310d 100644 --- a/test/Octokit.Webhooks.Test/Resources/workflow_job/completed.success.with-organization.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/workflow_job/completed.success.with-organization.payload.json @@ -7,11 +7,13 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "completed", "conclusion": "success", "started_at": "2021-08-05T10:34:58Z", + "created_at": "2021-08-05T10:33:58Z", "completed_at": "2021-08-05T10:38:16Z", "name": "linters", "steps": [ @@ -85,7 +87,8 @@ "runner_id": 5, "runner_name": "GitHub Actions 5", "runner_group_id": 2, - "runner_group_name": "GitHub Actions" + "runner_group_name": "GitHub Actions", + "workflow_name": "CodeQL" }, "repository": { "id": 186853002, diff --git a/test/Octokit.Webhooks.Test/Resources/workflow_job/in_progress.payload.json b/test/Octokit.Webhooks.Test/Resources/workflow_job/in_progress.payload.json index db4af0a7..94433a14 100644 --- a/test/Octokit.Webhooks.Test/Resources/workflow_job/in_progress.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/workflow_job/in_progress.payload.json @@ -7,11 +7,13 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "in_progress", "conclusion": null, "started_at": "2021-09-13T02:21:13Z", + "created_at": "2021-09-13T02:21:13Z", "completed_at": null, "name": "Analyze (javascript)", "steps": [ @@ -29,7 +31,8 @@ "runner_id": 5, "runner_name": "GitHub Actions 5", "runner_group_id": 2, - "runner_group_name": "GitHub Actions" + "runner_group_name": "GitHub Actions", + "workflow_name": "CodeQL" }, "repository": { "id": 186853002, diff --git a/test/Octokit.Webhooks.Test/Resources/workflow_job/queued.payload.json b/test/Octokit.Webhooks.Test/Resources/workflow_job/queued.payload.json index 2c60a0fe..cb97705c 100644 --- a/test/Octokit.Webhooks.Test/Resources/workflow_job/queued.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/workflow_job/queued.payload.json @@ -7,11 +7,13 @@ "run_attempt": 1, "node_id": "MDExOldvcmtmbG93UnVuMjg5NzgyNDUx", "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "head_branch": "main", "url": "https://api.github.com/repos/octo-org/octo-repo/actions/jobs/1291536064", "html_url": "https://github.com/octo-org/octo-repo/runs/1291536064", "status": "queued", "conclusion": null, "started_at": "2021-09-13T02:21:13Z", + "created_at": "2021-09-13T02:21:13Z", "completed_at": null, "name": "update", "steps": [], @@ -20,7 +22,8 @@ "runner_id": 5, "runner_name": "GitHub Actions 5", "runner_group_id": 2, - "runner_group_name": "GitHub Actions" + "runner_group_name": "GitHub Actions", + "workflow_name": "CodeQL" }, "repository": { "id": 186853002, diff --git a/test/Octokit.Webhooks.Test/Resources/workflow_run/completed.payload.json b/test/Octokit.Webhooks.Test/Resources/workflow_run/completed.payload.json index f9ed20f6..499bcee6 100644 --- a/test/Octokit.Webhooks.Test/Resources/workflow_run/completed.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/workflow_run/completed.payload.json @@ -240,6 +240,8 @@ "url": "https://api.github.com/repos/octo-org/octo-repo" }, "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "path": ".github/workflows/test.yml", + "display_title": "ci(action): update actions/setup-node digest to 8c91899", "html_url": "https://github.com/octo-org/octo-repo/actions/runs/289782451", "id": 289782451, "jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/289782451/jobs", diff --git a/test/Octokit.Webhooks.Test/Resources/workflow_run/completed.with-pull-requests.payload.json b/test/Octokit.Webhooks.Test/Resources/workflow_run/completed.with-pull-requests.payload.json index 3b5cc9a6..41daa5f7 100644 --- a/test/Octokit.Webhooks.Test/Resources/workflow_run/completed.with-pull-requests.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/workflow_run/completed.with-pull-requests.payload.json @@ -240,6 +240,8 @@ "url": "https://api.github.com/repos/octo-org/octo-repo" }, "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "path": ".github/workflows/test.yml", + "display_title": "ci(action): update actions/setup-node digest to 8c91899", "html_url": "https://github.com/octo-org/octo-repo/actions/runs/289782451", "id": 289782451, "jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/289782451/jobs", diff --git a/test/Octokit.Webhooks.Test/Resources/workflow_run/requested.payload.json b/test/Octokit.Webhooks.Test/Resources/workflow_run/requested.payload.json index a30df4bb..dc0ddf25 100644 --- a/test/Octokit.Webhooks.Test/Resources/workflow_run/requested.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/workflow_run/requested.payload.json @@ -240,6 +240,8 @@ "url": "https://api.github.com/repos/octo-org/octo-repo" }, "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "path": ".github/workflows/test.yml", + "display_title": "ci(action): update actions/setup-node digest to 8c91899", "html_url": "https://github.com/octo-org/octo-repo/actions/runs/289782451", "id": 289782451, "jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/289782451/jobs", diff --git a/test/Octokit.Webhooks.Test/Resources/workflow_run/requested.with-conclusion.payload.json b/test/Octokit.Webhooks.Test/Resources/workflow_run/requested.with-conclusion.payload.json index a31b189b..d6e01721 100644 --- a/test/Octokit.Webhooks.Test/Resources/workflow_run/requested.with-conclusion.payload.json +++ b/test/Octokit.Webhooks.Test/Resources/workflow_run/requested.with-conclusion.payload.json @@ -240,6 +240,8 @@ "url": "https://api.github.com/repos/octo-org/octo-repo" }, "head_sha": "3484a3fb816e0859fd6e1cea078d76385ff50625", + "path": ".github/workflows/test.yml", + "display_title": "ci(action): update actions/setup-node digest to 8c91899", "html_url": "https://github.com/octo-org/octo-repo/actions/runs/289782451", "id": 289782451, "jobs_url": "https://api.github.com/repos/octo-org/octo-repo/actions/runs/289782451/jobs",