@@ -91,20 +91,13 @@ export function getBuildName(
9191 * 1. If `--test` is set, returns 'testing'
9292 * 2. If `--metamaskEnvironment` is explicitly set via CLI, uses that value
9393 * 3. If `--env development`, returns 'development'
94- * 4. Otherwise (production-like builds), auto-detects from git context:
95- * - release/* branch → 'release-candidate'
96- * - main branch → 'staging'
97- * - pull_request event → 'pull-request'
98- * - anything else (including local builds) → 'other'
94+ * 4. Otherwise, auto-detects from git context (release branch, main, PR, or other)
9995 *
10096 * NOTE: 'production' environment is NEVER auto-detected. It must be explicitly
10197 * set via --metamaskEnvironment to prevent accidental pollution of production
10298 * Sentry with events from local or CI test builds.
10399 *
104100 * @param args - The parsed CLI arguments
105- * @param args.test - Whether this is a test build
106- * @param args.env - The webpack environment ('production' or 'development')
107- * @param args.metamaskEnvironment - Explicit environment override from CLI
108101 * @returns The resolved environment string
109102 */
110103export function resolveEnvironment (
@@ -164,7 +157,7 @@ export function getVariables(
164157 const isDevBuild = env === 'development' ;
165158
166159 // Resolve the MetaMask environment using proper detection logic
167- const environment = resolveEnvironment ( { test : args . test , env , ... args } ) ;
160+ const environment = resolveEnvironment ( { ... args , env } ) ;
168161
169162 function set ( key : string , value : unknown ) : void ;
170163 function set ( key : Record < string , unknown > ) : void ;
0 commit comments