The Perforce integration has no UI for adding depot repositories. Automatic repo sync is intentionally excluded (SCM_SYNC_PROVIDERS in sync_repos.py) because Perforce cannot derive external_id from its API. The only way to add a Perforce depot today is to manually POST to /api/0/organizations/{org}/repos/.
Current behavior
- The Repositories page (
/settings/org/repos/) renders Perforce installations (it has the commits feature gate) but shows no way to add depots.
- The "Sync now" button is wired to
/integrations/{id}/repo-sync/ which returns 400 for Perforce, so clicking it silently fails.
- Users must curl the repos API directly to add a depot.
Gap
The backend is fully ready: PerforceIntegration.get_repositories() returns available depots from the P4 server, and PerforceRepositoryProvider.get_repository_data() / build_repository_config() handle validation and persistence. There is no frontend depot-picker dialog that calls these.
Suggested approach
- Add an "Add depot" button/dialog on the Repositories page for Perforce installations (similar to how other integrations surface an add-repo flow).
- The dialog should call
get_repositories() to list available depots and POST to /api/0/organizations/{org}/repos/ on selection.
- Hide or disable the "Sync now" button for Perforce (backend already blocks it; frontend should too).
Relevant code:
src/sentry/integrations/perforce/integration.py — get_repositories(), SCM_SYNC_PROVIDERS comment
src/sentry/integrations/perforce/repository.py — get_repository_data(), build_repository_config()
src/sentry/integrations/api/endpoints/organization_integration_repo_sync.py — 400 guard for non-sync providers
static/app/views/settings/organizationRepositories/index.tsx — SCM_PROVIDER_ORDER (Perforce absent), ConnectedInstallation
Action taken on behalf of Sergiy Dybskiy.
The Perforce integration has no UI for adding depot repositories. Automatic repo sync is intentionally excluded (
SCM_SYNC_PROVIDERSinsync_repos.py) because Perforce cannot deriveexternal_idfrom its API. The only way to add a Perforce depot today is to manually POST to/api/0/organizations/{org}/repos/.Current behavior
/settings/org/repos/) renders Perforce installations (it has thecommitsfeature gate) but shows no way to add depots./integrations/{id}/repo-sync/which returns400for Perforce, so clicking it silently fails.Gap
The backend is fully ready:
PerforceIntegration.get_repositories()returns available depots from the P4 server, andPerforceRepositoryProvider.get_repository_data()/build_repository_config()handle validation and persistence. There is no frontend depot-picker dialog that calls these.Suggested approach
get_repositories()to list available depots and POST to/api/0/organizations/{org}/repos/on selection.Relevant code:
src/sentry/integrations/perforce/integration.py—get_repositories(),SCM_SYNC_PROVIDERScommentsrc/sentry/integrations/perforce/repository.py—get_repository_data(),build_repository_config()src/sentry/integrations/api/endpoints/organization_integration_repo_sync.py— 400 guard for non-sync providersstatic/app/views/settings/organizationRepositories/index.tsx—SCM_PROVIDER_ORDER(Perforce absent),ConnectedInstallationAction taken on behalf of Sergiy Dybskiy.