Skip to content

Commit 5706af1

Browse files
committed
Fix pr-check flag
1 parent e5bb225 commit 5706af1

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/commands/fix/agent-fix.mts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export type FixConfig = {
6868
cwd: string
6969
limit: number
7070
minSatisfying: boolean
71-
noPrCheck: boolean
71+
prCheck: boolean
7272
purls: string[]
7373
rangeStyle: RangeStyle
7474
spinner: Spinner | undefined
@@ -124,7 +124,7 @@ export async function agentFix(
124124
cwd,
125125
limit,
126126
minSatisfying,
127-
noPrCheck,
127+
prCheck,
128128
rangeStyle,
129129
spinner,
130130
test,
@@ -332,9 +332,9 @@ export async function agentFix(
332332
if (seenBranches.has(branch)) {
333333
continue infosLoop
334334
}
335-
const pr = noPrCheck
336-
? undefined
337-
: prs.find(p => p.headRefName === branch)
335+
const pr = prCheck
336+
? prs.find(p => p.headRefName === branch)
337+
: undefined
338338
if (pr) {
339339
debugFn('notice', `skip: PR #${pr.number} for ${name} exists`)
340340
seenBranches.add(branch)

src/commands/fix/cmd-fix.mts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ const config: CliCommandConfig = {
6565
description:
6666
'Constrain dependency updates to the minimum satisfying version',
6767
},
68-
noPrCheck: {
68+
prCheck: {
6969
type: 'boolean',
70-
default: false,
71-
description: 'Skip PR existence check',
70+
default: true,
71+
description: 'Check for an existing PR before attempting a fix',
7272
hidden: true,
7373
},
7474
purl: {
@@ -190,7 +190,7 @@ async function run(
190190
: Infinity) || Infinity
191191
const maxSatisfying = Boolean(cli.flags['maxSatisfying'])
192192
const minSatisfying = Boolean(cli.flags['minSatisfying']) || !maxSatisfying
193-
const noPrCheck = Boolean(cli.flags['noPrCheck'])
193+
const prCheck = Boolean(cli.flags['prCheck'])
194194
const purls = cmdFlagValueToArray(cli.flags['purl'])
195195
const testScript = String(cli.flags['testScript'] || 'test')
196196

@@ -200,7 +200,7 @@ async function run(
200200
ghsas,
201201
limit,
202202
minSatisfying,
203-
noPrCheck,
203+
prCheck,
204204
outputKind,
205205
purls,
206206
rangeStyle,

src/commands/fix/handle-fix.mts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export async function handleFix({
3131
ghsas,
3232
limit,
3333
minSatisfying,
34-
noPrCheck,
3534
outputKind,
35+
prCheck,
3636
purls,
3737
rangeStyle,
3838
spinner,
@@ -156,7 +156,7 @@ export async function handleFix({
156156
cwd,
157157
limit,
158158
minSatisfying,
159-
noPrCheck,
159+
prCheck,
160160
purls,
161161
rangeStyle,
162162
spinner,

0 commit comments

Comments
 (0)