File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,8 @@ export async function gitCreateAndPushBranchIfNeeded(
129129 basename === 'pnpm-lock.yaml'
130130 )
131131 } )
132+ debugLog ( 'branch' , branch )
133+ debugLog ( 'gitCreateAndPushBranchIfNeeded > moddedFilepaths' , moddedFilepaths )
132134 if ( moddedFilepaths . length ) {
133135 await spawn ( 'git' , [ 'add' , ...moddedFilepaths ] , { cwd } )
134136 }
@@ -141,7 +143,9 @@ export async function gitHardReset(cwd = process.cwd()): Promise<void> {
141143 await spawn ( 'git' , [ 'reset' , '--hard' ] , { cwd } )
142144}
143145
144- async function gitUnstagedModifiedFiles ( cwd = process . cwd ( ) ) : Promise < string [ ] > {
146+ async function gitUnstagedModifiedFiles (
147+ cwd = process . cwd ( )
148+ ) : Promise < string [ ] > {
145149 const { stdout } = await spawn ( 'git' , [ 'diff' , '--name-only' ] , { cwd } )
146150 const rawFiles = stdout ?. trim ( ) . split ( '\n' ) ?? [ ]
147151 return rawFiles . map ( relPath => normalizePath ( relPath ) )
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { RequestError } from '@octokit/request-error'
66import { Octokit } from '@octokit/rest'
77import { codeBlock } from 'common-tags'
88
9+ import { debugLog } from '@socketsecurity/registry/lib/debug'
910import { logger } from '@socketsecurity/registry/lib/logger'
1011import { spawn } from '@socketsecurity/registry/lib/spawn'
1112
@@ -14,7 +15,6 @@ import constants from '../../constants'
1415
1516import type { components } from '@octokit/openapi-types'
1617import type { OctokitResponse } from '@octokit/types'
17- import { debugLog } from '@socketsecurity/registry/lib/debug'
1818
1919type PullsCreateResponseData = components [ 'schemas' ] [ 'pull-request' ]
2020
Original file line number Diff line number Diff line change @@ -337,13 +337,16 @@ export async function pnpmFix(
337337 errored = true
338338 }
339339
340+ debugLog ( 'check "errored":' , errored )
340341 if ( ! errored && shouldOpenPr ) {
342+ debugLog ( '1: gitCreateAndPushBranchIfNeeded' )
341343 // eslint-disable-next-line no-await-in-loop
342344 await gitCreateAndPushBranchIfNeeded (
343345 branch ,
344346 getSocketCommitMessage ( oldPurl , newVersion , workspaceName ) ,
345347 cwd
346348 )
349+ debugLog ( '2: openGitHubPullRequest' )
347350 // eslint-disable-next-line no-await-in-loop
348351 const prResponse = await openGitHubPullRequest (
349352 owner ,
You can’t perform that action at this time.
0 commit comments