Skip to content

Commit 5498f58

Browse files
authored
Update cherry-pick pr script to use mergebase (#32031)
1 parent 1cbace6 commit 5498f58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/open-cherry-pick-pr.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ async function main() {
3636
Component commits:
3737
${logText.trim()}`
3838
const logpath = path.join(__dirname, "../", "logmessage.txt");
39+
const mergebase = runSequence([["git", ["merge-base", "origin/master", currentSha]]]).trim();
3940
runSequence([
4041
["git", ["checkout", "-b", "temp-branch"]],
41-
["git", ["reset", "origin/master", "--soft"]]
42+
["git", ["reset", mergebase, "--soft"]]
4243
]);
4344
fs.writeFileSync(logpath, logText);
4445
runSequence([

0 commit comments

Comments
 (0)