Allow exporting of campaign spec YAML
Created by: mrnugget
Right now, users can only edit/update a campaign if they have the matching campaign spec on their local machine.
That's especially important for customers who used campaigns before 3.19: their old campaigns have been migrated to the new workflow, but users don't have a way to update the campaigns.
But in our API the CampaignSpec
s have these two fields:
That should allow us to offer an export or download button on the campaigns page.
For new campaigns, we could simply download the original input, since that would contain comments etc.
For pre-3.19 campaigns we don't have the original input, but could convert the parsed input from JSON to YAML client-side and then download it.
cc @sourcegraph/campaigns
Work items
-
Make src-cli provide the original input, rather than a json serialized version -
Ask for design -
Expose raw spec on campaign -
Add initial implementation -
Reconcile with figma, once designs are ready