Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 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.
10 changes: 10 additions & 0 deletions static/app/icons/iconPerforce.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type {SVGIconProps} from './svgIcon';
import {SvgIcon} from './svgIcon';

export function IconPerforce(props: SVGIconProps) {
return (
<SvgIcon {...props}>
<path d="M1.28125 1.8457C2.08337 1.38511 3.0417 1.38512 3.84473 1.8457L6.44434 3.33789L4.8877 4.23145L3.06738 3.18555C2.61281 2.92531 2.21222 3.09894 2.06055 3.18555C1.9092 3.27207 1.55673 3.53097 1.55664 4.05273V11.9482C1.55676 12.47 1.90921 12.7289 2.06055 12.8154C2.21223 12.902 2.61372 13.0757 3.06738 12.8154L9.94141 8.86816C10.3951 8.6077 10.4443 8.17496 10.4443 8.00098C10.4443 7.82703 10.3952 7.39429 9.94141 7.13379L9.55664 6.91309L11.0762 6.04004C11.6607 6.51866 12 7.22487 12 8C12 8.92108 11.5207 9.7464 10.7188 10.207L3.84473 14.1543C3.4433 14.3841 3.00387 14.4999 2.56348 14.5C2.12299 14.5 1.68277 14.385 1.28125 14.1543C0.479393 13.6937 5.80635e-05 12.8683 0 11.9473V4.05273C6.83815e-05 3.13175 0.479391 2.30721 1.28125 1.8457ZM13.4365 1.5C13.877 1.5 14.3172 1.61497 14.7188 1.8457C15.5206 2.30632 15.9999 3.13177 16 4.05273V11.9473C15.9999 12.8682 15.5206 13.6937 14.7188 14.1543C13.9166 14.6149 12.9574 14.6149 12.1553 14.1543L9.55566 12.6621L11.1123 11.7686L12.9326 12.8145C13.3872 13.0747 13.7878 12.9011 13.9395 12.8145C14.0908 12.7279 14.4423 12.469 14.4424 11.9473V4.05273C14.4423 3.53097 14.0908 3.27207 13.9395 3.18555C13.7878 3.09894 13.3863 2.92531 12.9326 3.18555L6.05859 7.13281C5.60478 7.39332 5.55567 7.82606 5.55566 8C5.55566 8.17393 5.60478 8.60667 6.05859 8.86719L6.44336 9.08789L4.92383 9.96094V9.95996C4.33928 9.48134 4 8.77514 4 8C4.00001 7.07891 4.47928 6.25359 5.28125 5.79297L12.1553 1.8457C12.5567 1.61592 12.9961 1.50005 13.4365 1.5Z" />
</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,10 @@ function RepositoryProjectPathConfigForm({
}
);

// Stream-based VCS (like Perforce) use streams/codelines instead of branches
// and don't require a default branch to be specified
const isStreamBased = 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 +97,19 @@ function RepositoryProjectPathConfigForm({
{
name: 'defaultBranch',
type: 'string',
required: true,
label: t('Branch'),
placeholder: t('Type your branch'),
required: !isStreamBased,
label: isStreamBased ? t('Stream') : t('Branch'),
placeholder: isStreamBased
? 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: isStreamBased
? 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 +145,7 @@ function RepositoryProjectPathConfigForm({
}

const initialData = {
defaultBranch: 'main',
defaultBranch: isStreamBased ? '' : 'main',
stackRoot: '',
sourceRoot: '',
repositoryId: existingConfig?.repoId,
Expand Down
5 changes: 5 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