Rename campaigns to batch changes
Created by: mrnugget
Context: RFC 320 Timeline: Name change timeline
Plan
Start with user-visible things (API, content, docs, URLs) and end with implementation "details" (Go package name, directory names, database table names).
Why? Avoids rebasing problems as long as possible and gets the critical must-be-done stuff done first.
TODOs
sourcegraph/sourcegraph
-
Deprecate old GraphQL entities ( CampaignandCampaignSpec,CampaignsCodeHosts) and their queries & mutations. AddBatchChangeandBatchSpecentities, mutations, queries. PR: https://github.com/sourcegraph/sourcegraph/pull/18734-
In Go graphqlbackendpackage: rename GraphQL resolvers fromCampaignsResolvertoBatchChangesresolver -
In Go enterprise/internal/campaigns/resolverspackage: renamecampaignsResolvertobatchChangesResolverand same forBatchSpec.
-
-
Rename Go package campaignstobatchchangesPR: https://github.com/sourcegraph/sourcegraph/pull/18855 -
Change URL generation PR: https://github.com/sourcegraph/sourcegraph/pull/18859 -
WIP Rename Go types CampaignandCampaignSpechttps://github.com/sourcegraph/sourcegraph/pull/18864 -
Use new GraphQL names in webcode -
Change webviews to use "batch change" and "batch spec" wording -
Change webviews to use new src-cli commands -
Change Batch changestoBatch Changesin web -
Fix in-app docs links -
Redirect /<org-or-username>/campaignsto/<org-or-username>/batch-changes -
WIP @malomarrec Move doc/campaignstodoc/batch-changesPR https://github.com/sourcegraph/sourcegraph/pull/18854-
Redirect docs.sourcegraph.com/campaignstodocs.sourcegraph.com/batch-changes(see `doc/_resources/assets/redirects) -
Add redirect for the pages that have "campaigns" in their name: campaign_spec_yaml_reference -
Move doc/dev/background-information/campaignstodoc/dev/background-information/batch-changes -
Redirect docs.sourcegraph.com/dev/background-information/campaignstodocs.sourcegraph.com/dev/background-information/batch-changes(see `doc/_resources/assets/redirects) -
Change the content
-
-
site config options: see here -
campaigns.enabled -
campaigns.restrictToAdmins -
campaigns.readAccess.enabled(since it's deprecated anyway: remove?) -
Wrapper function here -
Usage here: here -
Also, see these validators here
-
-
errors: ErrCampaignsDisabled etc. in the resolvers: see this file -
we need to wrap those and return the Campaigns version when a campaigns mutation was used and a batchchange version when not -
UPDATE: @mrnugget and @eseliger discussed this and didn't think this was worth it, since the only place where these errors could show up is in the src-cli where
campaigncommands have been deprecated anyway.
-
-
Licensing PR: https://github.com/sourcegraph/sourcegraph/pull/18983 -
FeatureCampaignsneeds to be an alias -
Introduce FeatureBatchChanges
-
-
Rename database table and foreign keys -
UserCredentials "domain" is currently "campaigns"
-
-
Add changelog entry -
Regenerate docs for src-cli in doc/cli/references#18799 (closed) -
Rebase and update usagestatsPR https://github.com/sourcegraph/sourcegraph/pull/18604 -
Rebase and update analyticsPR https://github.com/sourcegraph/analytics/pull/109
sourcegraph/src-cli
-
Introduce aliases for src batch apply#18940 (closed)
Misc
-
Not sure: rename repos https://k8s.sgdev.org/search?q=campaign+type:repo&patternType=literal