761 B21 lines
Blame
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8import {atom} from 'jotai';
9import {codeReviewProvider} from '../CodeReviewInfo';
10
11/** Experimental backdoor setting to get around disabled submit modes. Useful for testing. */
12export const overrideDisabledSubmitModes = atom(process.env.NODE_ENV === 'development');
13
14export const experimentalBranchPRsEnabled = atom(process.env.NODE_ENV === 'development');
15
16export const branchPRsSupported = atom(get => {
17 const supported = get(codeReviewProvider)?.supportBranchingPrs ?? false;
18 const enabled = get(experimentalBranchPRsEnabled);
19 return supported && enabled;
20});
21