Skip to content

Repo owners can opt out

Created by: sourcegraph-bot

Problem

We want organisations to allow many users to use Batch Changes, and not only one, privileged access team.

Such a broad availability for Batch Changes could create spam on downstream repository owners, and result in a push to unplug Batch Changes as a whole. Instead, individual repository owners would like to opt-out of most Batch Changes.

There are some cases where a batch change is urgent and mandatory, such as security team fixes.

Why now

  • we want to enable Batch Changes being on by default, for all users in our accounts, and this addresses a concern that users have in doing so

  • we need to make steps like this to prepare Batch Changes on public code

Proposal

  • Allow repository owners to opt-out of Batch Changes by creating a .batchignorefile at the root of their repository.

  • Running src batch apply or src batch preview shows the number of files ignored resolved 7 repositories (+4 ignored)

  • There is an option to force/override a batch change on all matching repositories: src batch apply -f my.batch.yml -override

Design need

Should we include the override option somewhere in the GUI?

Alternatives explored

We conducted research with customers, testing if avoiding spam should be the responsibility of the batch change creator. It would be possible for customers to achieve the same behaviour through a search query excluding repository with a .batchignore. We concluded that this would not meet customer expectations, that campaign creators were likely to not use this, with negative impact on Batch Changes adoption.

Out of scope

  • Viewing ignored changesets from the batch change dashboard (still possible with a query)

  • Monorepo workspace support

  • In future versions, this file can specify a list of paths that need to be ignored, instead of ignoring the full repository