Skip to content

Commit 0f554fb

Browse files
improvements in the docs PR
1 parent 73dff3f commit 0f554fb

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

scripts/release-make-it-native.mjs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function injectUnreleasedToDoc(docPath, unreleasedContent) {
116116
month: "short",
117117
day: "numeric",
118118
});
119-
const title = `## ${MIN_VERSION}\n\n**Release date: ${formattedDate}**`;
119+
const title = `## Android ${MIN_VERSION} / iOS ${MIN_VERSION}\n\n**Release date: ${formattedDate}**`;
120120

121121
return `${frontmatter}\n\n${firstParagraph}\n${title}\n\n${unreleasedContent}\n\n${afterFirstParagraph}`;
122122
}
@@ -132,10 +132,19 @@ async function cloneDocsRepo() {
132132

133133
await git.addConfig("user.name", GIT_AUTHOR_NAME, false, "global");
134134
await git.addConfig("user.email", GIT_AUTHOR_EMAIL, false, "global");
135+
136+
// Add upstream remote and fetch so we can branch off the latest upstream/development.
137+
// This avoids including fork-only commits (e.g., sync.yml) in the PR.
138+
await git.addRemote(
139+
"upstream",
140+
`https://github.com/${DOCS_UPSTREAM_OWNER}/${DOCS_REPO_NAME}.git`
141+
);
142+
await git.fetch("upstream");
135143
}
136144

137145
async function checkoutLocalBranch(git) {
138-
await git.checkoutLocalBranch(DOCS_BRANCH_NAME);
146+
// Branch off upstream/development to ensure a clean PR with only our commit.
147+
await git.checkout(["-b", DOCS_BRANCH_NAME, "upstream/development"]);
139148
}
140149

141150
async function updateDocsMiNReleaseNotes(unreleasedContent) {

0 commit comments

Comments
 (0)