Skip to content

a8n: Handle the deletion of external services and repos

Created by: mrnugget

It's currently undefined what should happen when a site-admin deletes/updates an external service that then deletes repositories that are connected to existing Campaigns,CampaignPlans, CampaignJobs, Changesets, ChangesetJobs.

Here is the current "schema":

a8n_schema

The first step is to define what should happen in the following cases:

  1. What should happen to the changesets on the code hosts if a user deletes a Campaign on Sourcegraph?
  2. What should happen to the Sourcegraph Automation Changesets when a site-admin deletes a repository (e.g. by changing the external service config)?
  3. What should happen to a diff/changeset (CampaignJob) in a CampaignPlan when a site-admin deletes a repository?

Once that list exist, the second step is to handle the deletion of repositories/external services in these places.