Skip to content

Commit 228e592

Browse files
delete the sync.yml from local branch
1 parent 759af2f commit 228e592

1 file changed

Lines changed: 24 additions & 17 deletions

File tree

scripts/release-make-it-native.mjs

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,26 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) {
121121
return `${frontmatter}\n\n${firstParagraph}\n${title}\n\n${unreleasedContent}\n\n${afterFirstParagraph}`;
122122
}
123123

124-
async function syncForkWithUpstream() {
125-
// Sync the fork's development branch with upstream (mendix/docs) via the GitHub API.
126-
// This is equivalent to clicking "Sync fork" on GitHub and ensures the fork
127-
// doesn't have extra commits (e.g., from sync.yml merge commits) that would
128-
// appear in the PR diff.
129-
console.log("Syncing MendixMobile/docs fork with upstream mendix/docs...");
130-
const result = await octokit.request(
131-
"POST /repos/{owner}/{repo}/merge-upstream",
132-
{
133-
owner: DOCS_REPO_OWNER,
134-
repo: DOCS_REPO_NAME,
135-
branch: "development",
136-
}
137-
);
138-
console.log(`✅ Fork synced: ${result.data.message} (${result.data.merge_type})`);
139-
}
124+
// async function syncForkWithUpstream() {
125+
// // Sync the fork's development branch with upstream (mendix/docs) via the GitHub API.
126+
// // This is equivalent to clicking "Sync fork" on GitHub and ensures the fork
127+
// // doesn't have extra commits (e.g., from sync.yml merge commits) that would
128+
// // appear in the PR diff.
129+
// console.log("Syncing MendixMobile/docs fork with upstream mendix/docs...");
130+
// const result = await octokit.request(
131+
// "POST /repos/{owner}/{repo}/merge-upstream",
132+
// {
133+
// owner: DOCS_REPO_OWNER,
134+
// repo: DOCS_REPO_NAME,
135+
// branch: "development",
136+
// }
137+
// );
138+
// console.log(`✅ Fork synced: ${result.data.message} (${result.data.merge_type})`);
139+
// }
140+
141+
// This file exists only in the fork (MendixMobile/docs) and not in upstream (mendix/docs).
142+
// Removing it in our branch ensures it doesn't appear in the cross-fork PR diff.
143+
const FORK_SYNC_FILE = ".github/workflows/sync.yml";
140144

141145
async function cloneDocsRepo() {
142146
const git = simpleGit();
@@ -161,6 +165,10 @@ async function updateDocsMiNReleaseNotes(unreleasedContent) {
161165
}
162166

163167
async function createPRUpdateDocsMiNReleaseNotes(git) {
168+
// Remove the fork's sync.yml so it doesn't appear in the cross-fork PR diff.
169+
if (fs.existsSync(FORK_SYNC_FILE)) {
170+
await git.rm(FORK_SYNC_FILE);
171+
}
164172
await git.add(TARGET_FILE);
165173
await git.commit(`docs: update mobile release notes for v${MIN_VERSION}`);
166174
await git.push("origin", DOCS_BRANCH_NAME, ["--force"]);
@@ -199,7 +207,6 @@ async function updateMiNChangelog(changelog, unreleasedContent, changelogPath) {
199207
// Update MiN Release Notes in Docs repo
200208
async function updateMiNReleaseNotes(unreleasedContent) {
201209
try {
202-
await syncForkWithUpstream();
203210
await cloneDocsRepo();
204211
const git = simpleGit();
205212
await checkoutLocalBranch(git);

0 commit comments

Comments
 (0)