File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,20 @@ name: Help Command
33on :
44 issue_comment :
55 types : [created]
6+ workflow_dispatch :
7+ inputs :
8+ pr_number :
9+ description : ' Pull Request number to post help comment on'
10+ required : true
11+ type : string
612
713permissions :
814 issues : write
915 pull-requests : write
1016
1117jobs :
1218 help :
13- if : ${{ github.event.issue.pull_request && github.event.comment.body == '/help' }}
19+ if : ${{ ( github.event.issue.pull_request && github.event.comment.body == '/help') || github.event_name == 'workflow_dispatch ' }}
1420 runs-on : ubuntu-latest
1521
1622 steps :
@@ -132,9 +138,13 @@ jobs:
132138
133139 const helpText = generateHelpText();
134140
141+ const prNumber = context.eventName === 'workflow_dispatch'
142+ ? parseInt(context.payload.inputs.pr_number)
143+ : context.issue.number;
144+
135145 await github.rest.issues.createComment({
136146 owner: context.repo.owner,
137147 repo: context.repo.repo,
138- issue_number: context.issue.number ,
148+ issue_number: prNumber ,
139149 body: helpText
140150 });
You can’t perform that action at this time.
0 commit comments