From b5cc24443f8824ab2708405f7cc9e9ee1f640d2f Mon Sep 17 00:00:00 2001 From: wolfy1339 <4595477+wolfy1339@users.noreply.github.com> Date: Sun, 7 Feb 2021 13:28:15 -0500 Subject: [PATCH] fix: add enum to delete#ref_type to match the create event (#361) * fix: add enum to delete#ref_type to match the create event * build: generate types --- payload-schemas/schemas/delete/event.schema.json | 2 +- schema.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/payload-schemas/schemas/delete/event.schema.json b/payload-schemas/schemas/delete/event.schema.json index 1d9bb3663..8b09cd28c 100644 --- a/payload-schemas/schemas/delete/event.schema.json +++ b/payload-schemas/schemas/delete/event.schema.json @@ -5,7 +5,7 @@ "required": ["ref", "ref_type", "pusher_type", "repository", "sender"], "properties": { "ref": { "type": "string" }, - "ref_type": { "type": "string" }, + "ref_type": { "type": "string", "enum": ["tag", "branch"] }, "pusher_type": { "type": "string" }, "repository": { "$ref": "common/repository.schema.json" }, "sender": { "$ref": "common/user.schema.json" }, diff --git a/schema.d.ts b/schema.d.ts index d593f8317..d4976cc02 100644 --- a/schema.d.ts +++ b/schema.d.ts @@ -1651,7 +1651,7 @@ export interface CreateEvent { } export interface DeleteEvent { ref: string; - ref_type: string; + ref_type: "tag" | "branch"; pusher_type: string; repository: Repository; sender: User;