[MISC] Update UI webhook creation to enable secure by default (#202)

This commit is contained in:
Johannes Batzill 2023-01-13 01:40:15 -08:00 committed by GitHub
parent eabdf2ab86
commit d9a01ef9a3

View File

@ -81,7 +81,7 @@ export function WehookForm({ repoMetadata, isEdit, webhook }: WebHookFormProps)
url: webhook?.url || '', url: webhook?.url || '',
secret: isEdit && webhook?.has_secret ? SECRET_MASK : '', secret: isEdit && webhook?.has_secret ? SECRET_MASK : '',
enabled: webhook ? (webhook?.enabled as boolean) : true, enabled: webhook ? (webhook?.enabled as boolean) : true,
secure: webhook?.insecure === false || false, secure: webhook ? (webhook?.insecure === false as boolean) : true,
branchCreated: webhook?.triggers?.includes(WebhookIndividualEvent.BRANCH_CREATED) || false, branchCreated: webhook?.triggers?.includes(WebhookIndividualEvent.BRANCH_CREATED) || false,
branchUpdated: webhook?.triggers?.includes(WebhookIndividualEvent.BRANCH_UPDATED) || false, branchUpdated: webhook?.triggers?.includes(WebhookIndividualEvent.BRANCH_UPDATED) || false,
branchDeleted: webhook?.triggers?.includes(WebhookIndividualEvent.BRANCH_DELETED) || false, branchDeleted: webhook?.triggers?.includes(WebhookIndividualEvent.BRANCH_DELETED) || false,