Skip to content

a8n: Rename Threads to Changesets, add API endpoints to create Changesets

Administrator requested to merge a8n/add-changesets-to-campaign into master

Created by: mrnugget

This PR does multiple things:

  • It renames Threads to Changesets. We decided to keep Changesets and Issues separate for now instead of combining them in a Thread sum type. See this note to the rationale behind this decision. (Note: instead of renaming the table and all of its associated indexes and constraint, we simply drop the threads table in a migration and create a new changesets table. If you previously created threads, they will get deleted)
  • It establishes the many-to-many relationship between Campaigns and Changesets by adding jsonb columns to both tables that we use as a set of IDs.
  • It adds the GraphQL mutations createChangeset and addChangesetToCampaign. These allow the user to first create a changeset for a given Sourcegraph repository and a given external ID (i.e.: Sourcegraph GraphQL ID for sourcegraph/sourcegraph and the external ID 5549 to reference this pull request)

Important note: the Changeset is still "empty". We don't sync data from an external service yet. That will be the next step.

Merge request reports

Loading