Skip to content

batches: add upsert mutation for SSBC

Warren Gifford requested to merge aharvey/ssbc-cli into main

Created by: LawnGnome

This PR adds an upsert batch spec from raw mutation, which both speeds up and simplifies the logic in https://github.com/sourcegraph/src-cli/pull/671.

Logic is basically pulled from the existing create and replace mutations: the checks and behaviour should be identical to doing:

spec = getBatchSpecFor(namespace, raw.name)
if spec:
    replaceBatchSpecInput(spec, raw)
else:
    createBatchSpecFromRaw(raw)

Related to #26503 (closed).

Merge request reports

Loading