Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

src-cli: Implement new campaigns workflow #12333

@mrnugget

Description

@mrnugget

Docs/Schema in PR #10921

Tasks

  • Implement src campaigns apply (see this comment https://github.com/sourcegraph/sourcegraph/pull/10921#issuecomment-648599857)
  • Validate campaign spec YAML according to schema
    • I think duplicating that schema between here and src-cli is fine for now. If we can find a better solution that has src-cli fetch the schema from Sourcegraph: great.
  • Create changesetSpecs with the createChangesetSpec mutation (see schema here), remembering their IDs
  • Create campaignSpec, using the IDs as input
  • Print preview URL if user doesn't want to apply
  • Call applyCampaign if user wants to apply

Plus: clean up the code, possibly add tests, move code to smaller packages instead of the ./cmd folder, etc.

First deliverable

A draft PR that implements the new command and flow for us to test to validate how the UX feels.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions