Skip to content

Allow users to "enforce invariants" by running campaigns

Created by: mrnugget

This ticket is here so we don't forget about this.

The idea

We want to allow users to "enforce invariants" across their codebase by running campaigns. Example:

  • User creates a campaign that runs a linter over the codebase.
  • Linter fixes code in some repositories.
  • User applies campaign spec, creates a campaign that opens changesets in the affected repositories.
  • Changesets get merged.

But then, later, somebody re-introduces something that was fixed by the linter.

Now we want to allow the user to re-execute the same campaign spec and update the campaign to fix the issue again by opening up another changeset on the codehost.

What's missing

Most of that is already possible with the new workflow. The problem is that once the changesets have been merged we are not able to create new changesets in the repositories, since the branch in the campaign spec hasn't changed and we'd try to push another commit to the branch of the already merged changeset.

We need to:

  1. Determine which branch the new changeset should use
  2. Implement this so that we can still update existing changesets without always creating a new one.