From 265d15f8a11c3bb8ce7f21843043e2bbc64b753e Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 22 Jul 2026 11:30:52 +0530 Subject: [PATCH 1/4] remove slack messaging logic for testing purpose --- .github/workflows/release-make-it-native.yml | 23 -------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/release-make-it-native.yml b/.github/workflows/release-make-it-native.yml index 268a61da..603d40cc 100644 --- a/.github/workflows/release-make-it-native.yml +++ b/.github/workflows/release-make-it-native.yml @@ -30,26 +30,3 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PAT: ${{ secrets.PAT }} run: node scripts/release-make-it-native.mjs - - - name: Send success message - if: success() - uses: ./.github/actions/slack-notification - with: - channel-id: ${{ secrets.SLACK_CHANNEL_ID }} - message: | - ✅ *Make It Native automation succeeded!* - PRs created in: - • *make-it-native* - • *mendix/docs* - Please review and merge. 🙌 - bot-token: ${{ secrets.SLACK_BOT_TOKEN }} - - - name: Send failure message - if: failure() - uses: ./.github/actions/slack-notification - with: - channel-id: ${{ secrets.SLACK_CHANNEL_ID }} - message: | - ❌ *Make It Native automation failed!* - Please check the workflow logs for more details. 🛠 - bot-token: ${{ secrets.SLACK_BOT_TOKEN }} From abc9f620b20c6dcf471e363d58e92680bdd2b5f9 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 22 Jul 2026 11:50:11 +0530 Subject: [PATCH 2/4] Add sync logic and updates in release MiN script --- .github/workflows/release-make-it-native.yml | 5 +++++ scripts/release-make-it-native.mjs | 12 ++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-make-it-native.yml b/.github/workflows/release-make-it-native.yml index 603d40cc..61fafcb8 100644 --- a/.github/workflows/release-make-it-native.yml +++ b/.github/workflows/release-make-it-native.yml @@ -21,6 +21,11 @@ jobs: with: node-version-file: .nvmrc + - name: Sync docs fork with upstream + run: gh repo sync MendixMobile/docs --branch development --force + env: + GH_TOKEN: ${{ secrets.PAT }} + - name: Install dependencies run: npm ci diff --git a/scripts/release-make-it-native.mjs b/scripts/release-make-it-native.mjs index f1a59271..be05d5db 100644 --- a/scripts/release-make-it-native.mjs +++ b/scripts/release-make-it-native.mjs @@ -79,6 +79,9 @@ async function createPRUpdateChangelog() { await git.addConfig("user.name", GIT_AUTHOR_NAME, ["--global"]); await git.addConfig("user.email", GIT_AUTHOR_EMAIL, ["--global"]); + + // Get the current branch name (the one selected in GitHub Actions UI) + const currentBranch = await git.revparse(["--abbrev-ref", "HEAD"]); await git.checkoutLocalBranch(CHANGELOG_BRANCH_NAME); @@ -91,7 +94,7 @@ async function createPRUpdateChangelog() { repo: process.env.GITHUB_REPOSITORY.split("/")[1], title: `Update CHANGELOG for v${MIN_VERSION}`, head: CHANGELOG_BRANCH_NAME, - base: "main", + base: currentBranch, 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.", draft: true, }); @@ -121,9 +124,6 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) { return `${frontmatter}\n\n${firstParagraph}\n${title}\n\n${unreleasedContent}\n\n${afterFirstParagraph}`; } -// 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(); @@ -148,10 +148,6 @@ 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"]); From 9d2ea98ecb60f8d10edd03f251942cd961eaff4c Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 22 Jul 2026 12:59:01 +0530 Subject: [PATCH 3/4] update PAT with new value --- .github/workflows/release-make-it-native.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-make-it-native.yml b/.github/workflows/release-make-it-native.yml index 61fafcb8..d11e7508 100644 --- a/.github/workflows/release-make-it-native.yml +++ b/.github/workflows/release-make-it-native.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PAT: ${{ secrets.PAT }} + PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4 @@ -24,7 +24,7 @@ jobs: - name: Sync docs fork with upstream run: gh repo sync MendixMobile/docs --branch development --force env: - GH_TOKEN: ${{ secrets.PAT }} + GH_TOKEN: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} - name: Install dependencies run: npm ci @@ -33,5 +33,5 @@ jobs: env: MIN_VERSION: ${{ github.event.inputs.version }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PAT: ${{ secrets.PAT }} + PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} run: node scripts/release-make-it-native.mjs From d578a0f4fbc16fd7089c3baa2e0167de5f5cdb75 Mon Sep 17 00:00:00 2001 From: Saurabh Chavan Date: Wed, 22 Jul 2026 13:25:33 +0530 Subject: [PATCH 4/4] Revert "remove slack messaging logic for testing purpose" This reverts commit 8d7da3315034a34bd0262e3a62b601924d96f3fc. --- .github/workflows/release-make-it-native.yml | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.github/workflows/release-make-it-native.yml b/.github/workflows/release-make-it-native.yml index d11e7508..d8ed47d3 100644 --- a/.github/workflows/release-make-it-native.yml +++ b/.github/workflows/release-make-it-native.yml @@ -35,3 +35,26 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PAT: ${{ secrets.MENDIX_MOBILE_DOCS_PR_GITHUB_PAT }} run: node scripts/release-make-it-native.mjs + + - name: Send success message + if: success() + uses: ./.github/actions/slack-notification + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + message: | + ✅ *Make It Native automation succeeded!* + PRs created in: + • *make-it-native* + • *mendix/docs* + Please review and merge. 🙌 + bot-token: ${{ secrets.SLACK_BOT_TOKEN }} + + - name: Send failure message + if: failure() + uses: ./.github/actions/slack-notification + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + message: | + ❌ *Make It Native automation failed!* + Please check the workflow logs for more details. 🛠 + bot-token: ${{ secrets.SLACK_BOT_TOKEN }}