File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 11import { program , Option } from 'commander'
22
33import github from './github.js'
4- import { getActionContext } from './action-context.js'
54import { octoSecondaryRatelimitRetry } from './secondary-ratelimit-retry'
65
76const DRY_RUN = process . env . DRY_RUN || 'false'
@@ -32,19 +31,13 @@ const CONFIGS: Config[] = [
3231 } ,
3332]
3433
35- let owner = 'github'
36- let repo = 'docs-internal'
37-
38- if ( process . env . GITHUB_EVENT_PATH ) {
39- const actionContext = getActionContext ( )
40- owner = actionContext . owner
41- repo = actionContext . repo
42- }
34+ const owner = process . env . GITHUB_REPOSITORY_OWNER || 'github'
35+ const repo = process . env . GITHUB_REPOSITORY ?. split ( '/' ) [ 1 ] || 'docs-internal'
4336
4437program
4538 . description ( 'Finds PRs with "FOR PREVIEW ONLY" in the title that are too old and closes them.' )
46- . option ( 'owner' , 'Owner of the repository' , owner )
47- . option ( 'repo' , 'Name of the repository' , repo )
39+ . option ( '-- owner' , 'Owner of the repository' , owner )
40+ . option ( '-- repo' , 'Name of the repository' , repo )
4841 . addOption (
4942 new Option (
5043 '--dry-run' ,
You can’t perform that action at this time.
0 commit comments