api/webhooks: Add missing default case
1 files changed, 2 insertions(+), 0 deletions(-)

M api/graph/schema.resolvers.go
M api/graph/schema.resolvers.go +2 -0
@@ 417,6 417,8 @@ func (r *mutationResolver) CreateWebhook
 		case model.WebhookEventRepoCreated, model.WebhookEventRepoUpdate,
 			model.WebhookEventRepoDeleted:
 			access = "REPOSITORIES"
+		default:
+			return nil, fmt.Errorf("Unsupported event %s", ev.String())
 		}
 		if !user.Grants.Has(access, auth.RO) {
 			return nil, fmt.Errorf("Insufficient access granted for webhook event %s", ev.String())