File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 44import { Octokit } from "@octokit/rest" ;
55import { runSequence } from "./run-sequence" ;
66
7- function padNum ( num : number ) {
8- const str = "" + num ;
9- return str . length >= 2 ? str : "0" + str ;
10- }
11-
127const userName = process . env . GH_USERNAME ;
138const reviewers = process . env . REQUESTING_USER ? [ process . env . REQUESTING_USER ] : [ "weswigham" , "sandersn" , "RyanCavanaugh" ] ;
149const now = new Date ( ) ;
1510const masterBranchname = `user-baseline-updates` ;
16- const branchName = process . env . TARGET_FORK . toLowerCase ( ) === "microsoft" && ( process . env . TARGET_BRANCH || "master" ) === "master"
11+ const targetBranch = process . env . TARGET_BRANCH || "master" ;
12+ const branchName = process . env . TARGET_FORK . toLowerCase ( ) === "microsoft" && ( targetBranch === "master" || targetBranch === "refs/heads/master" )
1713 ? masterBranchname
18- : `user-update-${ process . env . TARGET_FORK } -${ now . getFullYear ( ) } ${ padNum ( now . getMonth ( ) + 1 ) } ${ padNum ( now . getDate ( ) ) } ${ process . env . TARGET_BRANCH ? "-" + process . env . TARGET_BRANCH : "" } ` ;
14+ : `user-update-${ process . env . TARGET_FORK } -${ process . env . TARGET_BRANCH ? "-" + process . env . TARGET_BRANCH : "" } ` ;
1915const remoteUrl = `https://${ process . argv [ 2 ] } @github.com/${ userName } /TypeScript.git` ;
2016const baseRef = branchName === masterBranchname ? "master" : masterBranchname ;
2117runSequence ( [
You can’t perform that action at this time.
0 commit comments