@@ -14,6 +14,8 @@ import {
1414
1515import type { CResult } from '../../types.mts'
1616
17+ const { SOCKET_DEFAULT_BRANCH , SOCKET_DEFAULT_REPOSITORY } = constants
18+
1719export async function setupScanConfig (
1820 cwd : string ,
1921 defaultOnReadError = false ,
@@ -136,15 +138,15 @@ async function configureScan(
136138 message :
137139 '(--repo) What repo name (slug) should be reported to Socket for this dir?' ,
138140 default :
139- config . repo || ( await getRepoName ( cwd ) ) || 'socket-default-repository' ,
141+ config . repo || ( await getRepoName ( cwd ) ) || SOCKET_DEFAULT_REPOSITORY ,
140142 required : false ,
141143 // validate: async string => bool
142144 } )
143145 if ( defaultRepoName === undefined ) {
144146 return canceledByUser ( )
145147 }
146148 if ( defaultRepoName ) {
147- // Even if it's 'socket-default-repository' store it because if we change
149+ // Even if it's SOCKET_DEFAULT_REPOSITORY store it because if we change
148150 // this default then an existing user probably would not expect the change?
149151 config . repo = defaultRepoName
150152 } else {
@@ -154,15 +156,15 @@ async function configureScan(
154156 const defaultBranchName = await input ( {
155157 message :
156158 '(--branch) What branch name (slug) should be reported to Socket for this dir?' ,
157- default : config . branch || ( await gitBranch ( cwd ) ) || 'socket-default-branch' ,
159+ default : config . branch || ( await gitBranch ( cwd ) ) || SOCKET_DEFAULT_BRANCH ,
158160 required : false ,
159161 // validate: async string => bool
160162 } )
161163 if ( defaultBranchName === undefined ) {
162164 return canceledByUser ( )
163165 }
164166 if ( defaultBranchName ) {
165- // Even if it's 'socket-default-branch' store it because if we change
167+ // Even if it's SOCKET_DEFAULT_BRANCH store it because if we change
166168 // this default then an existing user probably would not expect the change?
167169 config . branch = defaultBranchName
168170 } else {
0 commit comments