Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/sentry/static/sentry/images/logos/logo-perforce.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions static/app/icons/iconPerforce.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type {SVGIconProps} from './svgIcon';
import {SvgIcon} from './svgIcon';

export function IconPerforce(props: SVGIconProps) {
return (
<SvgIcon {...props} viewBox="0 0 176.53 144.22">
<path d="M122.2,50.37l-16.76,9.68,4.24,2.45c5.01,2.89,5.55,7.69,5.55,9.62s-.54,6.73-5.55,9.62l-75.84,43.79c-5.01,2.89-9.44.96-11.11,0-1.67-.96-5.55-3.83-5.55-9.62V28.32c0-5.79,3.88-8.66,5.55-9.62,1.67-.96,6.09-2.89,11.11,0l20.09,11.6,17.17-9.91L42.42,3.83C33.56-1.28,22.99-1.28,14.14,3.83,5.29,8.95,0,18.1,0,28.32v87.58c0,10.22,5.29,19.38,14.14,24.49,4.43,2.56,9.28,3.83,14.14,3.83s9.71-1.28,14.14-3.83l75.84-43.79c8.85-5.11,14.14-14.27,14.14-24.49,0-8.6-3.75-16.43-10.2-21.74Z" />
<path d="M54.33,93.86l16.76-9.68-4.24-2.45c-5.01-2.89-5.55-7.69-5.55-9.62s.54-6.73,5.55-9.62l75.84-43.79c5.01-2.89,9.44-.96,11.11,0,1.67.96,5.55,3.83,5.55,9.62v87.58c0,5.79-3.88,8.66-5.55,9.62-1.67.96-6.09,2.89-11.11,0l-20.09-11.6-17.17,9.91,28.68,16.56c8.85,5.11,19.43,5.11,28.28,0,8.85-5.11,14.14-14.27,14.14-24.49V28.32c0-10.22-5.29-19.38-14.14-24.49-4.43-2.56-9.28-3.83-14.14-3.83s-9.71,1.28-14.14,3.83L58.27,47.62c-8.85,5.11-14.14,14.27-14.14,24.49,0,8.6,3.75,16.43,10.2,21.74Z" />
</SvgIcon>
);
}
1 change: 1 addition & 0 deletions static/app/icons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export {IconNumber} from './iconNumber';
export {IconOpen} from './iconOpen';
export {IconPanel} from './iconPanel';
export {IconPause} from './iconPause';
export {IconPerforce} from './iconPerforce';
export {IconPin} from './iconPin';
export {IconPlay} from './iconPlay';
export {IconPrevent} from './iconPrevent';
Expand Down
2 changes: 2 additions & 0 deletions static/app/plugins/components/pluginIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import jumpcloud from 'sentry-logos/logo-jumpcloud.svg';
import msteams from 'sentry-logos/logo-msteams.svg';
import opsgenie from 'sentry-logos/logo-opsgenie.svg';
import pagerduty from 'sentry-logos/logo-pagerduty.svg';
import perforce from 'sentry-logos/logo-perforce.svg';
import pivotal from 'sentry-logos/logo-pivotaltracker.svg';
import pushover from 'sentry-logos/logo-pushover.svg';
import redmine from 'sentry-logos/logo-redmine.svg';
Expand Down Expand Up @@ -57,6 +58,7 @@ const PLUGIN_ICONS = {
msteams,
opsgenie,
pagerduty,
perforce,
pivotal,
pushover,
redmine,
Expand Down
2 changes: 1 addition & 1 deletion static/app/types/integrations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ export type CodeOwner = {
users_without_access: string[];
};
id: string;
provider: 'github' | 'gitlab';
provider: 'github' | 'gitlab' | 'perforce';
raw: string;
codeMapping?: RepositoryProjectPathConfig;
ownershipSyntax?: string;
Expand Down
7 changes: 7 additions & 0 deletions static/app/utils/integrationUtil.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
IconGithub,
IconGitlab,
IconJira,
IconPerforce,
IconSentry,
IconVsts,
} from 'sentry/icons';
Expand Down Expand Up @@ -206,6 +207,8 @@ export const getIntegrationIcon = (
case 'jira':
case 'jira_server':
return <IconJira size={iconSize} />;
case 'perforce':
return <IconPerforce size={iconSize} />;
case 'vsts':
return <IconVsts size={iconSize} />;
case 'codecov':
Expand All @@ -230,6 +233,8 @@ export const getIntegrationDisplayName = (integrationType?: string) => {
case 'jira':
case 'jira_server':
return 'Jira';
case 'perforce':
return 'Perforce';
case 'vsts':
return 'Azure DevOps';
case 'codecov':
Expand Down Expand Up @@ -279,6 +284,8 @@ export function getCodeOwnerIcon(
return <IconGithub size={iconSize} />;
case 'gitlab':
return <IconGitlab size={iconSize} />;
case 'perforce':
return <IconPerforce size={iconSize} />;
default:
return <IconSentry size={iconSize} />;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ function RepositoryProjectPathConfigForm({
}
);

const isPerforce = integration.provider.key === 'perforce';

// Effect to handle the case when integration repos data becomes available
useEffect(() => {
if (integrationReposData?.repos && selectedRepo) {
Expand Down Expand Up @@ -93,13 +95,19 @@ function RepositoryProjectPathConfigForm({
{
name: 'defaultBranch',
type: 'string',
required: true,
label: t('Branch'),
placeholder: t('Type your branch'),
required: !isPerforce,
label: isPerforce ? t('Stream') : t('Branch'),
placeholder: isPerforce
? t('Type your stream (optional, e.g., main)')
: t('Type your branch'),
showHelpInTooltip: true,
help: t(
'If an event does not have a release tied to a commit, we will use this branch when linking to your source code.'
),
help: isPerforce
? t(
'Optional: Specify a stream/codeline (e.g., "main"). If not specified, the depot root will be used. Streams are part of the depot path in Perforce.'
)
: t(
'If an event does not have a release tied to a commit, we will use this branch when linking to your source code.'
),
},
{
name: 'stackRoot',
Expand Down Expand Up @@ -135,7 +143,7 @@ function RepositoryProjectPathConfigForm({
}

const initialData = {
defaultBranch: 'main',
defaultBranch: isPerforce ? '' : 'main',
stackRoot: '',
sourceRoot: '',
repositoryId: existingConfig?.repoId,
Expand Down
6 changes: 6 additions & 0 deletions static/images/integrations/perforce.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading