Skip to content

Commit 5c791d4

Browse files
committed
Minor cleanup of constants.SOCKET_DEFAULT_BRANCH use
1 parent 9a800d0 commit 5c791d4

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/commands/ci/handle-ci.mts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ export async function handleCi(autoManifest: boolean): Promise<void> {
2121

2222
const orgSlug = orgSlugCResult.data
2323
const cwd = process.cwd()
24-
// Lazily access constants.SOCKET_DEFAULT_BRANCH.
2524
const branchName = (await gitBranch(cwd)) || (await detectDefaultBranch(cwd))
26-
// Lazily access constants.SOCKET_DEFAULT_REPOSITORY.
27-
const repoName =
28-
(await getRepoName(cwd)) || constants.SOCKET_DEFAULT_REPOSITORY
25+
const repoName = await getRepoName(cwd)
2926

3027
await handleCreateNewScan({
3128
autoManifest,

src/commands/scan/setup-scan-config.mts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ async function configureScan(
147147
return canceledByUser()
148148
}
149149
if (defaultRepoName) {
150-
// Even if it's SOCKET_DEFAULT_REPOSITORY store it because if we change
151-
// this default then an existing user probably would not expect the change?
150+
// Store it even if it's constants.SOCKET_DEFAULT_REPOSITORY because if we
151+
// change this default then an existing user probably would not expect the change.
152152
config.repo = defaultRepoName
153153
} else {
154154
delete config.repo
@@ -168,8 +168,8 @@ async function configureScan(
168168
return canceledByUser()
169169
}
170170
if (defaultBranchName) {
171-
// Even if it's SOCKET_DEFAULT_BRANCH store it because if we change
172-
// this default then an existing user probably would not expect the change?
171+
// Store it even if it's constants.SOCKET_DEFAULT_BRANCH because if we change
172+
// this default then an existing user probably would not expect the change.
173173
config.branch = defaultBranchName
174174
} else {
175175
delete config.branch

0 commit comments

Comments
 (0)