From 5498f583f982b336725af200aa109abb7cc39992 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Fri, 21 Jun 2019 14:34:26 -0700 Subject: [PATCH] Update cherry-pick pr script to use mergebase (#32031) --- scripts/open-cherry-pick-pr.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/open-cherry-pick-pr.ts b/scripts/open-cherry-pick-pr.ts index 8bdeb05e4a2..5fc7f0ae299 100644 --- a/scripts/open-cherry-pick-pr.ts +++ b/scripts/open-cherry-pick-pr.ts @@ -36,9 +36,10 @@ async function main() { Component commits: ${logText.trim()}` const logpath = path.join(__dirname, "../", "logmessage.txt"); + const mergebase = runSequence([["git", ["merge-base", "origin/master", currentSha]]]).trim(); runSequence([ ["git", ["checkout", "-b", "temp-branch"]], - ["git", ["reset", "origin/master", "--soft"]] + ["git", ["reset", mergebase, "--soft"]] ]); fs.writeFileSync(logpath, logText); runSequence([