@@ -79,6 +79,9 @@ async function createPRUpdateChangelog() {
7979
8080 await git . addConfig ( "user.name" , GIT_AUTHOR_NAME , [ "--global" ] ) ;
8181 await git . addConfig ( "user.email" , GIT_AUTHOR_EMAIL , [ "--global" ] ) ;
82+
83+ // Get the current branch name (the one selected in GitHub Actions UI)
84+ const currentBranch = await git . revparse ( [ "--abbrev-ref" , "HEAD" ] ) ;
8285
8386 await git . checkoutLocalBranch ( CHANGELOG_BRANCH_NAME ) ;
8487
@@ -91,7 +94,7 @@ async function createPRUpdateChangelog() {
9194 repo : process . env . GITHUB_REPOSITORY . split ( "/" ) [ 1 ] ,
9295 title : `Update CHANGELOG for v${ MIN_VERSION } ` ,
9396 head : CHANGELOG_BRANCH_NAME ,
94- base : "main" ,
97+ base : currentBranch ,
9598 body : "**Note:** Please do not take any action on this pull request unless it has been reviewed and approved by a member of the Mobile team." ,
9699 draft : true ,
97100 } ) ;
@@ -121,9 +124,6 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) {
121124 return `${ frontmatter } \n\n${ firstParagraph } \n${ title } \n\n${ unreleasedContent } \n\n${ afterFirstParagraph } ` ;
122125}
123126
124- // This file exists only in the fork (MendixMobile/docs) and not in upstream (mendix/docs).
125- // Removing it in our branch ensures it doesn't appear in the cross-fork PR diff.
126- const FORK_SYNC_FILE = ".github/workflows/sync.yml" ;
127127
128128async function cloneDocsRepo ( ) {
129129 const git = simpleGit ( ) ;
@@ -148,10 +148,6 @@ async function updateDocsMiNReleaseNotes(unreleasedContent) {
148148}
149149
150150async function createPRUpdateDocsMiNReleaseNotes ( git ) {
151- // Remove the fork's sync.yml so it doesn't appear in the cross-fork PR diff.
152- if ( fs . existsSync ( FORK_SYNC_FILE ) ) {
153- await git . rm ( FORK_SYNC_FILE ) ;
154- }
155151 await git . add ( TARGET_FILE ) ;
156152 await git . commit ( `docs: update mobile release notes for v${ MIN_VERSION } ` ) ;
157153 await git . push ( "origin" , DOCS_BRANCH_NAME , [ "--force" ] ) ;
0 commit comments