From aaf7aedf3104a1e402e58981e7bbf29d39eb8094 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 25 Mar 2026 17:04:51 +0530 Subject: [PATCH 01/10] changed to correct make it native file in docs repo --- scripts/release-make-it-native.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index 4f9c1faa..9e46441b 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -37,7 +37,7 @@ const DOCS_REPO_OWNER = "MendixMobile"; const DOCS_UPSTREAM_OWNER = "mendix"; const DOCS_BRANCH_NAME = `update-mobile-release-notes-v${MIN_VERSION}`; const TARGET_FILE = - "content/en/docs/releasenotes/mobile/make-it-native-parent/make-it-native-10.md"; + "content/en/docs/releasenotes/mobile/make-it-native-parent/make-it-native.md"; const octokit = new Octokit({ auth: GITHUB_PAT }); From 73dff3f5b10c6548e26c5b7c178ecd980005876c Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 25 Mar 2026 17:11:24 +0530 Subject: [PATCH 02/10] commit to be reverted about slack notification , only for testing purpose --- .github/workflows/release-make-it-native.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-make-it-native.yml b/.github/workflows/release-make-it-native.yml index 268a61da..bddc8b7a 100644 --- a/.github/workflows/release-make-it-native.yml +++ b/.github/workflows/release-make-it-native.yml @@ -32,7 +32,7 @@ jobs: run: node scripts/release-make-it-native.mjs - name: Send success message - if: success() + if: false # Disabled for testing, restore to success() when done uses: ./.github/actions/slack-notification with: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} @@ -45,7 +45,7 @@ jobs: bot-token: ${{ secrets.SLACK_BOT_TOKEN }} - name: Send failure message - if: failure() + if: false # Disabled for testing, restore to failure() when done uses: ./.github/actions/slack-notification with: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} From 0f554fb35fc4722f99664a33f54c4d0813333c0e Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 25 Mar 2026 18:35:52 +0530 Subject: [PATCH 03/10] improvements in the docs PR --- scripts/release-make-it-native.mjs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index 9e46441b..d5e063d1 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -116,7 +116,7 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) { month: "short", day: "numeric", }); - const title = `## ${MIN_VERSION}\n\n**Release date: ${formattedDate}**`; + const title = `## Android ${MIN_VERSION} / iOS ${MIN_VERSION}\n\n**Release date: ${formattedDate}**`; return `${frontmatter}\n\n${firstParagraph}\n${title}\n\n${unreleasedContent}\n\n${afterFirstParagraph}`; } @@ -132,10 +132,19 @@ async function cloneDocsRepo() { await git.addConfig("user.name", GIT_AUTHOR_NAME, false, "global"); await git.addConfig("user.email", GIT_AUTHOR_EMAIL, false, "global"); + + // Add upstream remote and fetch so we can branch off the latest upstream/development. + // This avoids including fork-only commits (e.g., sync.yml) in the PR. + await git.addRemote( + "upstream", + `https://github.com/${DOCS_UPSTREAM_OWNER}/${DOCS_REPO_NAME}.git` + ); + await git.fetch("upstream"); } async function checkoutLocalBranch(git) { - await git.checkoutLocalBranch(DOCS_BRANCH_NAME); + // Branch off upstream/development to ensure a clean PR with only our commit. + await git.checkout(["-b", DOCS_BRANCH_NAME, "upstream/development"]); } async function updateDocsMiNReleaseNotes(unreleasedContent) { From d4541d0dbfe1e0c403bef6daddebbc71a07f0fcc Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Thu, 26 Mar 2026 10:28:43 +0530 Subject: [PATCH 04/10] pipeline error fix --- scripts/release-make-it-native.mjs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index d5e063d1..e03d0874 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -130,16 +130,19 @@ async function cloneDocsRepo() { process.chdir(DOCS_REPO_NAME); - await git.addConfig("user.name", GIT_AUTHOR_NAME, false, "global"); - await git.addConfig("user.email", GIT_AUTHOR_EMAIL, false, "global"); + // Re-initialize simpleGit after chdir so it operates inside the cloned repo. + const repoGit = simpleGit(); + + await repoGit.addConfig("user.name", GIT_AUTHOR_NAME, false, "global"); + await repoGit.addConfig("user.email", GIT_AUTHOR_EMAIL, false, "global"); // Add upstream remote and fetch so we can branch off the latest upstream/development. // This avoids including fork-only commits (e.g., sync.yml) in the PR. - await git.addRemote( + await repoGit.addRemote( "upstream", `https://github.com/${DOCS_UPSTREAM_OWNER}/${DOCS_REPO_NAME}.git` ); - await git.fetch("upstream"); + await repoGit.fetch("upstream"); } async function checkoutLocalBranch(git) { From d7f7e736b0f10d287a10505480d8b74211363ee9 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Thu, 26 Mar 2026 11:02:46 +0530 Subject: [PATCH 05/10] authentication added --- scripts/release-make-it-native.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index e03d0874..35271ea9 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -140,7 +140,7 @@ async function cloneDocsRepo() { // This avoids including fork-only commits (e.g., sync.yml) in the PR. await repoGit.addRemote( "upstream", - `https://github.com/${DOCS_UPSTREAM_OWNER}/${DOCS_REPO_NAME}.git` + `https://x-access-token:${GITHUB_PAT}@github.com/${DOCS_UPSTREAM_OWNER}/${DOCS_REPO_NAME}.git` ); await repoGit.fetch("upstream"); } From 1bc9e410613c82b5681a53d6212323f2c37f6076 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Thu, 26 Mar 2026 11:20:08 +0530 Subject: [PATCH 06/10] pipeline fixes --- scripts/release-make-it-native.mjs | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index 35271ea9..eedc3c9c 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -135,19 +135,24 @@ async function cloneDocsRepo() { await repoGit.addConfig("user.name", GIT_AUTHOR_NAME, false, "global"); await repoGit.addConfig("user.email", GIT_AUTHOR_EMAIL, false, "global"); +} - // Add upstream remote and fetch so we can branch off the latest upstream/development. - // This avoids including fork-only commits (e.g., sync.yml) in the PR. - await repoGit.addRemote( - "upstream", - `https://x-access-token:${GITHUB_PAT}@github.com/${DOCS_UPSTREAM_OWNER}/${DOCS_REPO_NAME}.git` - ); - await repoGit.fetch("upstream"); +async function getUpstreamDevelopmentSha() { + // Use the GitHub API to get the latest commit SHA of mendix/docs:development. + // This lets us branch from the exact upstream state without needing direct clone access, + // avoiding fork-only commits (e.g., sync.yml) from appearing in the PR. + const { data: branch } = await octokit.repos.getBranch({ + owner: DOCS_UPSTREAM_OWNER, + repo: DOCS_REPO_NAME, + branch: "development", + }); + console.log(`Branching from upstream development SHA: ${branch.commit.sha}`); + return branch.commit.sha; } async function checkoutLocalBranch(git) { - // Branch off upstream/development to ensure a clean PR with only our commit. - await git.checkout(["-b", DOCS_BRANCH_NAME, "upstream/development"]); + const upstreamSha = await getUpstreamDevelopmentSha(); + await git.checkout(["-b", DOCS_BRANCH_NAME, upstreamSha]); } async function updateDocsMiNReleaseNotes(unreleasedContent) { From b2f579728233685b04f8ebe832c47df7575a57ca Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Thu, 26 Mar 2026 11:29:59 +0530 Subject: [PATCH 07/10] reverted back to original changes --- scripts/release-make-it-native.mjs | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index eedc3c9c..943cdcdb 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -130,29 +130,12 @@ async function cloneDocsRepo() { process.chdir(DOCS_REPO_NAME); - // Re-initialize simpleGit after chdir so it operates inside the cloned repo. - const repoGit = simpleGit(); - - await repoGit.addConfig("user.name", GIT_AUTHOR_NAME, false, "global"); - await repoGit.addConfig("user.email", GIT_AUTHOR_EMAIL, false, "global"); -} - -async function getUpstreamDevelopmentSha() { - // Use the GitHub API to get the latest commit SHA of mendix/docs:development. - // This lets us branch from the exact upstream state without needing direct clone access, - // avoiding fork-only commits (e.g., sync.yml) from appearing in the PR. - const { data: branch } = await octokit.repos.getBranch({ - owner: DOCS_UPSTREAM_OWNER, - repo: DOCS_REPO_NAME, - branch: "development", - }); - console.log(`Branching from upstream development SHA: ${branch.commit.sha}`); - return branch.commit.sha; + await git.addConfig("user.name", GIT_AUTHOR_NAME, false, "global"); + await git.addConfig("user.email", GIT_AUTHOR_EMAIL, false, "global"); } async function checkoutLocalBranch(git) { - const upstreamSha = await getUpstreamDevelopmentSha(); - await git.checkout(["-b", DOCS_BRANCH_NAME, upstreamSha]); + await git.checkoutLocalBranch(DOCS_BRANCH_NAME); } async function updateDocsMiNReleaseNotes(unreleasedContent) { From 759af2ff51ec857a5f7f3c8240b88178fef90856 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Thu, 26 Mar 2026 12:09:35 +0530 Subject: [PATCH 08/10] built custom sync logic in the release script --- scripts/release-make-it-native.mjs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index 943cdcdb..451ce09a 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -121,6 +121,23 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) { return `${frontmatter}\n\n${firstParagraph}\n${title}\n\n${unreleasedContent}\n\n${afterFirstParagraph}`; } +async function syncForkWithUpstream() { + // Sync the fork's development branch with upstream (mendix/docs) via the GitHub API. + // This is equivalent to clicking "Sync fork" on GitHub and ensures the fork + // doesn't have extra commits (e.g., from sync.yml merge commits) that would + // appear in the PR diff. + console.log("Syncing MendixMobile/docs fork with upstream mendix/docs..."); + const result = await octokit.request( + "POST /repos/{owner}/{repo}/merge-upstream", + { + owner: DOCS_REPO_OWNER, + repo: DOCS_REPO_NAME, + branch: "development", + } + ); + console.log(`✅ Fork synced: ${result.data.message} (${result.data.merge_type})`); +} + async function cloneDocsRepo() { const git = simpleGit(); @@ -182,6 +199,7 @@ async function updateMiNChangelog(changelog, unreleasedContent, changelogPath) { // Update MiN Release Notes in Docs repo async function updateMiNReleaseNotes(unreleasedContent) { try { + await syncForkWithUpstream(); await cloneDocsRepo(); const git = simpleGit(); await checkoutLocalBranch(git); From 228e5926557e4286653330519fa13f431498d13d Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Thu, 26 Mar 2026 13:11:13 +0530 Subject: [PATCH 09/10] delete the sync.yml from local branch --- scripts/release-make-it-native.mjs | 41 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index 451ce09a..c1b7d3e4 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -121,22 +121,26 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) { return `${frontmatter}\n\n${firstParagraph}\n${title}\n\n${unreleasedContent}\n\n${afterFirstParagraph}`; } -async function syncForkWithUpstream() { - // Sync the fork's development branch with upstream (mendix/docs) via the GitHub API. - // This is equivalent to clicking "Sync fork" on GitHub and ensures the fork - // doesn't have extra commits (e.g., from sync.yml merge commits) that would - // appear in the PR diff. - console.log("Syncing MendixMobile/docs fork with upstream mendix/docs..."); - const result = await octokit.request( - "POST /repos/{owner}/{repo}/merge-upstream", - { - owner: DOCS_REPO_OWNER, - repo: DOCS_REPO_NAME, - branch: "development", - } - ); - console.log(`✅ Fork synced: ${result.data.message} (${result.data.merge_type})`); -} +// async function syncForkWithUpstream() { +// // Sync the fork's development branch with upstream (mendix/docs) via the GitHub API. +// // This is equivalent to clicking "Sync fork" on GitHub and ensures the fork +// // doesn't have extra commits (e.g., from sync.yml merge commits) that would +// // appear in the PR diff. +// console.log("Syncing MendixMobile/docs fork with upstream mendix/docs..."); +// const result = await octokit.request( +// "POST /repos/{owner}/{repo}/merge-upstream", +// { +// owner: DOCS_REPO_OWNER, +// repo: DOCS_REPO_NAME, +// branch: "development", +// } +// ); +// console.log(`✅ Fork synced: ${result.data.message} (${result.data.merge_type})`); +// } + +// This file exists only in the fork (MendixMobile/docs) and not in upstream (mendix/docs). +// Removing it in our branch ensures it doesn't appear in the cross-fork PR diff. +const FORK_SYNC_FILE = ".github/workflows/sync.yml"; async function cloneDocsRepo() { const git = simpleGit(); @@ -161,6 +165,10 @@ async function updateDocsMiNReleaseNotes(unreleasedContent) { } async function createPRUpdateDocsMiNReleaseNotes(git) { + // Remove the fork's sync.yml so it doesn't appear in the cross-fork PR diff. + if (fs.existsSync(FORK_SYNC_FILE)) { + await git.rm(FORK_SYNC_FILE); + } await git.add(TARGET_FILE); await git.commit(`docs: update mobile release notes for v${MIN_VERSION}`); await git.push("origin", DOCS_BRANCH_NAME, ["--force"]); @@ -199,7 +207,6 @@ async function updateMiNChangelog(changelog, unreleasedContent, changelogPath) { // Update MiN Release Notes in Docs repo async function updateMiNReleaseNotes(unreleasedContent) { try { - await syncForkWithUpstream(); await cloneDocsRepo(); const git = simpleGit(); await checkoutLocalBranch(git); From c849394852b29a3472612faaf8f4fb97a2391328 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Thu, 26 Mar 2026 16:21:27 +0530 Subject: [PATCH 10/10] removed unnecessary code and reverted slack temperory code --- .github/workflows/release-make-it-native.yml | 4 ++-- scripts/release-make-it-native.mjs | 17 ----------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-make-it-native.yml b/.github/workflows/release-make-it-native.yml index bddc8b7a..268a61da 100644 --- a/.github/workflows/release-make-it-native.yml +++ b/.github/workflows/release-make-it-native.yml @@ -32,7 +32,7 @@ jobs: run: node scripts/release-make-it-native.mjs - name: Send success message - if: false # Disabled for testing, restore to success() when done + if: success() uses: ./.github/actions/slack-notification with: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} @@ -45,7 +45,7 @@ jobs: bot-token: ${{ secrets.SLACK_BOT_TOKEN }} - name: Send failure message - if: false # Disabled for testing, restore to failure() when done + if: failure() uses: ./.github/actions/slack-notification with: channel-id: ${{ secrets.SLACK_CHANNEL_ID }} diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index c1b7d3e4..f1a59271 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -121,23 +121,6 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) { return `${frontmatter}\n\n${firstParagraph}\n${title}\n\n${unreleasedContent}\n\n${afterFirstParagraph}`; } -// async function syncForkWithUpstream() { -// // Sync the fork's development branch with upstream (mendix/docs) via the GitHub API. -// // This is equivalent to clicking "Sync fork" on GitHub and ensures the fork -// // doesn't have extra commits (e.g., from sync.yml merge commits) that would -// // appear in the PR diff. -// console.log("Syncing MendixMobile/docs fork with upstream mendix/docs..."); -// const result = await octokit.request( -// "POST /repos/{owner}/{repo}/merge-upstream", -// { -// owner: DOCS_REPO_OWNER, -// repo: DOCS_REPO_NAME, -// branch: "development", -// } -// ); -// console.log(`✅ Fork synced: ${result.data.message} (${result.data.merge_type})`); -// } - // This file exists only in the fork (MendixMobile/docs) and not in upstream (mendix/docs). // Removing it in our branch ensures it doesn't appear in the cross-fork PR diff. const FORK_SYNC_FILE = ".github/workflows/sync.yml";