Files
zeekayandHanzo Dev f888991a7a drop the Sentry wordmark from the react app
FSL-1.0-Apache-2.0 grants us the code, not the name. "Sentry" is
Functional Software's trademark, so every place the running app says it
to a user -- page titles, onboarding, empty states, toasts, settings
copy, the self-hosted footer -- now says Sentinel.

Attribution is the other half of the deal and stays untouched: upstream
copyright headers, LICENSE, NOTICE. So does anything where the mark is a
fact rather than a brand -- @sentry/* packages, sentry-cli, the wizard
and bundler plugins, docs.sentry.io, the whole gettingStartedDocs tree.
Renaming those would leave instructions that no longer work.

Nothing structural moved. No import, identifier, route path, feature
flag, API field or test id changed; the diff is 312 lines in and 312
out. Colocated specs were updated in lockstep with the copy they assert.
Marketing and community links point at hanzo.ai, only where a real page
exists to point at.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-10 18:01:22 -07:00

153 lines
4.3 KiB
TypeScript

import type {Field} from 'sentry/components/forms/types';
import ExternalLink from 'sentry/components/links/externalLink';
import {tct} from 'sentry/locale';
import {extractMultilineFields} from 'sentry/utils';
const getPublicFormFields = (): Field[] => [
{
name: 'name',
type: 'string',
required: true,
placeholder: 'e.g. My Integration',
label: 'Name',
help: 'Human readable name of your Integration.',
},
{
name: 'author',
type: 'string',
required: true,
placeholder: 'e.g. Acme Software',
label: 'Author',
help: 'The company or person who built and maintains this Integration.',
},
{
name: 'webhookUrl',
type: 'string',
required: true,
label: 'Webhook URL',
placeholder: 'e.g. https://example.com/sentry/webhook/',
help: tct(
'All webhook requests for your integration will be sent to this URL. Visit the [webhook_docs:documentation] to see the different types and payloads.',
{
webhook_docs: (
<ExternalLink href="https://docs.sentry.io/product/integrations/integration-platform/webhooks/" />
),
}
),
},
{
name: 'redirectUrl',
type: 'string',
label: 'Redirect URL',
placeholder: 'e.g. https://example.com/sentry/setup/',
help: 'The URL Sentinel will redirect users to after installation.',
},
{
name: 'verifyInstall',
label: 'Verify Installation',
type: 'boolean',
help: 'If enabled, installations will need to be verified before becoming installed.',
},
{
name: 'isAlertable',
type: 'boolean',
label: 'Alert Rule Action',
disabled: ({webhookDisabled}) => webhookDisabled,
disabledReason: 'Cannot enable alert rule action without a webhook url',
help: tct(
'If enabled, this integration will be available in Issue Alert rules and Metric Alert rules in Sentinel. The notification destination is the Webhook URL specified above. More on actions [learn_more:here].',
{
learn_more: (
<ExternalLink href="https://docs.sentry.io/product/alerts-notifications/notifications/" />
),
}
),
},
{
name: 'schema',
type: 'textarea',
label: 'Schema',
autosize: true,
rows: 1,
help: tct(
'Schema for your UI components. Click [schema_docs:here] for documentation.',
{
schema_docs: (
<ExternalLink href="https://docs.sentry.io/product/integrations/integration-platform/ui-components/" />
),
}
),
getValue: (val: string) => (val === '' ? {} : JSON.parse(val)),
setValue: (val: string) => {
const schema = JSON.stringify(val, null, 2);
if (schema === '{}') {
return '';
}
return schema;
},
validate: ({id, form}) => {
if (!form.schema) {
return [];
}
try {
JSON.parse(form.schema);
} catch (e) {
return [[id, 'Invalid JSON']];
}
return [];
},
},
{
name: 'overview',
type: 'textarea',
label: 'Overview',
autosize: true,
rows: 1,
help: 'Description of your Integration and its functionality.',
},
{
name: 'allowedOrigins',
type: 'string',
multiline: true,
placeholder: 'e.g. example.com',
label: 'Authorized JavaScript Origins',
help: 'Separate multiple entries with a newline.',
getValue: (val: string) => extractMultilineFields(val),
setValue: (val: string[] | undefined | null) =>
(val && typeof val.join === 'function' && val.join('\n')) || '',
},
];
export const publicIntegrationForms = [
{
title: 'Public Integration Details',
fields: getPublicFormFields(),
},
];
const getInternalFormFields = () => {
// Generate internal form fields copy copying the public form fields and
// making adjustments:
//
// 1. remove fields not needed for internal integrations
// 2. make webhookUrl optional
const internalFormFields = getPublicFormFields().filter(
formField =>
!['redirectUrl', 'verifyInstall', 'author'].includes(formField.name || '')
);
const webhookField = internalFormFields.find(field => field.name === 'webhookUrl');
if (webhookField) {
webhookField.required = false;
}
return internalFormFields;
};
export const internalIntegrationForms = [
{
title: 'Internal Integration Details',
fields: getInternalFormFields(),
},
];