Skip to content

batches: don't show batch changes on sourcegraph.com

Administrator requested to merge kr/show-batch-changes-sourcegraph-dotcom into main

Created by: courier-new

Thanks to @eseliger for catching -- the showBatchChanges context we get from the server didn't check if you were on sourcegraph.com, so my lovely new Batch Changes repo button and page are now showing up on every repo on sourcegraph.com, but it just takes you to an error page. 😂 This just updates that; it'll still defer to the config as the authority, but if nothing's set, it'll only be true if it's not sourcegraph.com.

(Also, @eseliger, it looks like the check at the resolver layer is actually already calling this method, but then extending it with logic for the individual user's permissions and in order to return different sorts of errors depending on the situation, so I'm not sure there's much I can consolidate there, but very open to suggestions if you had something in mind that when you mentioned that!!)

Merge request reports

Loading