File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ export type FixConfig = {
6868 cwd : string
6969 limit : number
7070 minSatisfying : boolean
71+ noPrCheck : boolean
7172 purls : string [ ]
7273 rangeStyle : RangeStyle
7374 spinner : Spinner | undefined
@@ -123,6 +124,7 @@ export async function agentFix(
123124 cwd,
124125 limit,
125126 minSatisfying,
127+ noPrCheck,
126128 rangeStyle,
127129 spinner,
128130 test,
@@ -330,7 +332,9 @@ export async function agentFix(
330332 if ( seenBranches . has ( newVersion ) ) {
331333 continue infosLoop
332334 }
333- const pr = prs . find ( p => p . headRefName === branch )
335+ const pr = noPrCheck
336+ ? undefined
337+ : prs . find ( p => p . headRefName === branch )
334338 if ( pr ) {
335339 debugFn ( 'notice' , `skip: PR #${ pr . number } for ${ name } exists` )
336340 seenBranches . add ( branch )
Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ const config: CliCommandConfig = {
6565 description :
6666 'Constrain dependency updates to the minimum satisfying version' ,
6767 } ,
68+ noPrCheck : {
69+ type : 'boolean' ,
70+ default : false ,
71+ description : 'Skip PR existence check' ,
72+ hidden : true ,
73+ } ,
6874 purl : {
6975 type : 'string' ,
7076 default : [ ] ,
@@ -184,6 +190,7 @@ async function run(
184190 : Infinity ) || Infinity
185191 const maxSatisfying = Boolean ( cli . flags [ 'maxSatisfying' ] )
186192 const minSatisfying = Boolean ( cli . flags [ 'minSatisfying' ] ) || ! maxSatisfying
193+ const noPrCheck = Boolean ( cli . flags [ 'noPrCheck' ] )
187194 const purls = cmdFlagValueToArray ( cli . flags [ 'purl' ] )
188195 const testScript = String ( cli . flags [ 'testScript' ] || 'test' )
189196
@@ -193,6 +200,7 @@ async function run(
193200 ghsas,
194201 limit,
195202 minSatisfying,
203+ noPrCheck,
196204 outputKind,
197205 purls,
198206 rangeStyle,
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ export async function handleFix({
3131 ghsas,
3232 limit,
3333 minSatisfying,
34+ noPrCheck,
3435 outputKind,
3536 purls,
3637 rangeStyle,
@@ -155,6 +156,7 @@ export async function handleFix({
155156 cwd,
156157 limit,
157158 minSatisfying,
159+ noPrCheck,
158160 purls,
159161 rangeStyle,
160162 spinner,
You can’t perform that action at this time.
0 commit comments