Skip to content

Commit

Permalink
Hide branch for vip app if Custom Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum committed Jun 17, 2024
1 parent c7f4a0f commit 053a0a5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/bin/vip-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ command( { requiredArgs: 1, format: true } )
try {
res = await app(
arg[ 0 ],
'id,repo,name,environments{id,appId,name,type,branch,currentCommit,primaryDomain{name},launched}'
'id,repo,name,environments{id,appId,name,type,branch,currentCommit,primaryDomain{name},launched,deploymentStrategy}'
);
} catch ( err ) {
await trackEvent( 'app_command_fetch_error', {
Expand Down Expand Up @@ -65,6 +65,14 @@ command( { requiredArgs: 1, format: true } )
// Flatten object
clonedEnv.primaryDomain = clonedEnv.primaryDomain.name;

// Set branch to empty for custom deployments
if ( clonedEnv.deploymentStrategy === 'custom-deploy' ) {
clonedEnv.branch = '-';
}

// Hide "deployment strategy" column
delete clonedEnv.deploymentStrategy;

return clonedEnv;
} );

Expand Down

0 comments on commit 053a0a5

Please sign in to comment.