Something went wrong while fetching comments. Please try again.
Created by: mrnugget
This PR implements the majority of the implementation proposed in RFC 95 (see rest of ticket for what's missing). It started out as a proof of concept but as I realized that updating a campaign might not be that complicated if we say that updating a Campaign means changing its CampaignPlanID I implemented it "properly" (there's still bits missing, like Bitbucket Server support, see bottom of this description).
That being said: this idea behind updating a Campaign (and the API) still needs to be validated by @eseliger and @felixfbecker. That's what I expect as their review here.
What I want from @tsenart @ryanslade is a "standard" technical review with feedback on APIs and implementation, so I can work on the PR and possibly shift its direction/implementation while @eseliger and @felixfbecker think about the frontend side of this implementation.
It extends the GraphQL API to accept an optional plan: ID in UpdateCampaignArgs. If the ID points to a finished CampaignPlan, the Campaign will be updated to the new CampaignPlan.
Every CampaignJob (changeset in GraphQL) belonging to the new CampaignPlan will then be compared with the existing ChangesetJobs/Changesets pairs (ExternalChangeset in GraphQL) to decide whether to
ExternalChangeset from Campaign and close it on codehostExternalChangeset on codehostExternalChangeset as it isExternalChangeset on the codehostThe decision what to do with which changeset happens synchronously in the updateCampaign mutation.
Then, asynchronously, the changesets are updated/created/closed on the codehost.
The update process as described above is implemented in this PR, except:
But I don't think these need to necessarily be in this PR and can be addressed in follow-ups.