File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
lib/workers/repository/update/branch Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,18 @@ async function checkExistingBranch(
196
196
return existingContent ;
197
197
}
198
198
199
+ // check if current !== newString and return 1 if it does or 0 if it doesn't
200
+ function updatedToInt (
201
+ current : string | undefined ,
202
+ newString : string | undefined ,
203
+ ) : number {
204
+ if ( current && newString && newString !== current ) {
205
+ return 1 ;
206
+ } else {
207
+ return 0 ;
208
+ }
209
+ }
210
+
199
211
export async function doAutoReplace (
200
212
upgrade : BranchUpgradeConfig ,
201
213
existingContent : string ,
@@ -225,11 +237,6 @@ export async function doAutoReplace(
225
237
return await checkExistingBranch ( upgrade , existingContent ) ;
226
238
}
227
239
228
- // check if current !== newString and return 1 if it does or 0 if it doesn't
229
- const updatedToInt = (
230
- current : string | undefined ,
231
- newString : string | undefined ,
232
- ) : number => ( current && newString && newString !== current ? 1 : 0 ) ;
233
240
// count how many strings need to be updated
234
241
const changedCount =
235
242
updatedToInt ( depName , newName ) +
You can’t perform that action at this time.
0 commit comments