Update cherry-pick pr script to use mergebase (#32031)

This commit is contained in:
Wesley Wigham 2019-06-21 14:34:26 -07:00 committed by GitHub
parent 1cbace6eee
commit 5498f583f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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([