Skip to content

Commit e3b6bd2

Browse files
committed
getDate not getDay, also 1-based months please
1 parent 1236a10 commit e3b6bd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/open-user-pr.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function padNum(num: number) {
1212
const userName = process.env.GH_USERNAME;
1313
const reviewers = process.env.REQUESTING_USER ? [process.env.REQUESTING_USER] : ["weswigham", "sandersn", "RyanCavanaugh"];
1414
const now = new Date();
15-
const branchName = `user-update-${process.env.TARGET_FORK}-${now.getFullYear()}${padNum(now.getMonth())}${padNum(now.getDay())}${process.env.TARGET_BRANCH ? "-" + process.env.TARGET_BRANCH : ""}`;
15+
const branchName = `user-update-${process.env.TARGET_FORK}-${now.getFullYear()}${padNum(now.getMonth() + 1)}${padNum(now.getDate())}${process.env.TARGET_BRANCH ? "-" + process.env.TARGET_BRANCH : ""}`;
1616
const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`;
1717
runSequence([
1818
["git", ["checkout", "."]], // reset any changes

0 commit comments

Comments
 (0)