@@ -11,7 +11,7 @@ import {targetLabels} from '../../../pr/common/labels/target.js';
1111 * @param projectDir - The path to the project directory.
1212 * @param newBranchName - The name of the new branch to add to the base branches list.
1313 * @returns A promise that resolves to the path of the modified `renovate.json` file if updated,
14- * or `null` if the file was not found or the `baseBranches ` array has an unexpected format.
14+ * or `null` if the file was not found or the `baseBranchPatterns ` array has an unexpected format.
1515 */
1616export async function updateRenovateConfig (
1717 projectDir : string ,
@@ -25,17 +25,17 @@ export async function updateRenovateConfig(
2525
2626 const config = await readFile ( renovateConfigPath , 'utf-8' ) ;
2727 const configJson = JSON . parse ( config ) as Record < string , unknown > ;
28- const baseBranches = configJson [ 'baseBranches ' ] ;
28+ const baseBranchPatterns = configJson [ 'baseBranchPatterns ' ] ;
2929
30- if ( ! Array . isArray ( baseBranches ) || baseBranches . length !== 2 ) {
30+ if ( ! Array . isArray ( baseBranchPatterns ) || baseBranchPatterns . length !== 2 ) {
3131 Log . warn (
32- ` ✘ Skipped updating Renovate config: "baseBranches " must contain exactly 2 branches.` ,
32+ ` ✘ Skipped updating Renovate config: "baseBranchPatterns " must contain exactly 2 branches.` ,
3333 ) ;
3434
3535 return null ;
3636 }
3737
38- configJson [ 'baseBranches ' ] = [ 'main' , newBranchName ] ;
38+ configJson [ 'baseBranchPatterns ' ] = [ 'main' , newBranchName ] ;
3939
4040 updateRenovateTargetLabel (
4141 configJson ,
@@ -56,7 +56,7 @@ export async function updateRenovateConfig(
5656 * @param fromLabel - The label name to be replaced.
5757 * @param toLabel - The new label name to replace `fromLabel` with.
5858 * @returns A promise that resolves to the path of the modified `renovate.json` file if updated,
59- * or `null` if the file was not found or the `baseBranches ` array has an unexpected format.
59+ * or `null` if the file was not found or the `baseBranchPatterns ` array has an unexpected format.
6060 */
6161export async function updateRenovateConfigTargetLabels (
6262 projectDir : string ,
@@ -73,11 +73,11 @@ export async function updateRenovateConfigTargetLabels(
7373 const config = await readFile ( renovateConfigPath , 'utf-8' ) ;
7474 const configJson = JSON . parse ( config ) as Record < string , unknown > ;
7575
76- // Check baseBranches just in case, though this function's primary focus is labels
77- const baseBranches = configJson [ 'baseBranches ' ] ;
78- if ( ! Array . isArray ( baseBranches ) || baseBranches . length !== 2 ) {
76+ // Check baseBranchPatterns just in case, though this function's primary focus is labels
77+ const baseBranchPatterns = configJson [ 'baseBranchPatterns ' ] ;
78+ if ( ! Array . isArray ( baseBranchPatterns ) || baseBranchPatterns . length !== 2 ) {
7979 Log . warn (
80- ` ✘ Skipped updating Renovate config: "baseBranches " must contain exactly 2 branches.` ,
80+ ` ✘ Skipped updating Renovate config: "baseBranchPatterns " must contain exactly 2 branches.` ,
8181 ) ;
8282
8383 return null ;
0 commit comments