Skip to content

Commit 1fe9a0a

Browse files
authored
Small fix to user PR script (#31679)
1 parent 82ea885 commit 1fe9a0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/open-user-pr.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function padNum(number: number) {
99
}
1010

1111
const userName = process.env.GH_USERNAME;
12-
const reviewers = process.env.requesting_user ? [process.env.requesting_user] : ["weswigham", "sandersn", "RyanCavanaugh"];
12+
const reviewers = process.env.REQUESTING_USER ? [process.env.REQUESTING_USER] : ["weswigham", "sandersn", "RyanCavanaugh"];
1313
const now = new Date();
1414
const branchName = `user-update-${process.env.TARGET_FORK}-${now.getFullYear()}${padNum(now.getMonth())}${padNum(now.getDay())}${process.env.TARGET_BRANCH ? "-" + process.env.TARGET_BRANCH : ""}`;
1515
const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`;
@@ -36,14 +36,14 @@ gh.pulls.create({
3636
head: `${userName}:${branchName}`,
3737
base: process.env.TARGET_BRANCH || "master",
3838
body:
39-
`${process.env.source_issue ? `This test run was triggerd by a request on https://github.com/Microsoft/TypeScript/pull/${process.env.source_issue} `+"\n" : ""}Please review the diff and merge if no changes are unexpected.
39+
`${process.env.SOURCE_ISSUE ? `This test run was triggerd by a request on https://github.com/Microsoft/TypeScript/pull/${process.env.SOURCE_ISSUE} `+"\n" : ""}Please review the diff and merge if no changes are unexpected.
4040
You can view the build log [here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${process.env.BUILD_BUILDID}&_a=summary).
4141
4242
cc ${reviewers.map(r => "@" + r).join(" ")}`,
4343
}).then(async r => {
4444
const num = r.data.number;
4545
console.log(`Pull request ${num} created.`);
46-
if (!process.env.source_issue) {
46+
if (!process.env.SOURCE_ISSUE) {
4747
await gh.pulls.createReviewRequest({
4848
owner: process.env.TARGET_FORK,
4949
repo: "TypeScript",
@@ -53,7 +53,7 @@ cc ${reviewers.map(r => "@" + r).join(" ")}`,
5353
}
5454
else {
5555
await gh.issues.createComment({
56-
number: +process.env.source_issue,
56+
number: +process.env.SOURCE_ISSUE,
5757
owner: "Microsoft",
5858
repo: "TypeScript",
5959
body: `The user suite test run you requested has finished and _failed_. I've opened a [PR with the baseline diff from master](${r.data.html_url}).`

0 commit comments

Comments
 (0)