Add produceLKG flag to cherry-pick PR script

This commit is contained in:
Wesley Wigham 2019-08-16 13:01:18 -07:00
parent 46b7972885
commit e145f322d8
No known key found for this signature in database
GPG Key ID: D59F87F60C5400C9
10 changed files with 21 additions and 11 deletions

View File

@ -11,6 +11,7 @@ const userName = process.env.GH_USERNAME;
const reviewers = process.env.REQUESTING_USER ? [process.env.REQUESTING_USER] : ["weswigham", "RyanCavanaugh"];
const branchName = `pick/${process.env.SOURCE_ISSUE}/${process.env.TARGET_BRANCH}`;
const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`;
const produceLKG = !!process.env.produceLKG;
async function main() {
if (!process.env.TARGET_BRANCH) {
@ -52,7 +53,16 @@ ${logText.trim()}`
runSequence([
["git", ["checkout", process.env.TARGET_BRANCH]], // checkout the target branch
["git", ["checkout", "-b", branchName]], // create a new branch
["git", ["cherry-pick", squashSha.trim()]], //
["git", ["cherry-pick", squashSha.trim()]],
]);
if (produceLKG) {
runSequence([
["gulp", ["LKG"]],
["git", ["add", "lib"]],
["git", ["commit", "-m", `"Update LKG"`]]
]);
}
runSequence([
["git", ["remote", "add", "fork", remoteUrl]], // Add the remote fork
["git", ["push", "--set-upstream", "fork", branchName, "-f"]] // push the branch
]);
@ -71,7 +81,7 @@ ${logText.trim()}`
base: process.env.TARGET_BRANCH,
body:
`This cherry-pick was triggerd by a request on https://github.com/Microsoft/TypeScript/pull/${process.env.SOURCE_ISSUE}
Please review the diff and merge if no changes are unexpected.
Please review the diff and merge if no changes are unexpected.${produceLKG ? ` An LKG update commit is included seperately from the base change.` : ""}
You can view the cherry-pick log [here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${process.env.BUILD_BUILDID}&_a=summary).
cc ${reviewers.map(r => "@" + r).join(" ")}`,

@ -1 +1 @@
Subproject commit 40bdb4eadabc9fbed7d83e3f26817a931c0763b6
Subproject commit 1bf5836cae5246b89bbf7063c3e84e110222fcdf

@ -1 +1 @@
Subproject commit ef797268ddfe9b2e5d2273b953eebdbffb4f734c
Subproject commit 30acce5e136e86bcf4eff1df151742f78142aa1a

@ -1 +1 @@
Subproject commit 1404377597038d22c9df43b49ced70bae635edba
Subproject commit bfc20b2f17c0206105e2cdd42cd35d79dd03a884

@ -1 +1 @@
Subproject commit c243b11a6f827e780a5163999bc472c95ff5a0e0
Subproject commit 56024cfe414491a9097e9dd33661a5ad5d51d975

@ -1 +1 @@
Subproject commit 21ae22dbd3ae3d3a55d9efd4eead3dd7fb6d8e6e
Subproject commit 2ee3b482456cd2a09ccbd3a4b0c20f3d0c5a5644

@ -1 +1 @@
Subproject commit dc74990b89b5c6e143b522c759be3dac2c286514
Subproject commit 437b83f0337a5d57ce7dd976d2c3b44cb2037e45

@ -1 +1 @@
Subproject commit 1e471a007968b7490563b91ed6909ae6046f3fe8
Subproject commit 23146404850011972f695fb6bc2b8113c3cffbfc

@ -1 +1 @@
Subproject commit 2c6df6ddd1aeb39b6858a1b7c980fe20079230da
Subproject commit b6b29502eb6a75fe3869806f0e7b27195fe51b0d

@ -1 +1 @@
Subproject commit dc2668873162ff3369eb8787c1b79f909650e040
Subproject commit 743ae6da9a6fc3b459a7ab3bb250fb07d14f9c5d