File tree 2 files changed +40
-6
lines changed
2 files changed +40
-6
lines changed Original file line number Diff line number Diff line change
1
+ name : On-Demand Poe Task
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ comment-id :
7
+ description : " Optional comment-id of the slash command. Ignore if not applicable."
8
+ required : false
9
+ pr :
10
+ description : " PR Number"
11
+ required : false
12
+
13
+ permissions :
14
+ contents : write
15
+ pull-requests : write
16
+
17
+ jobs :
18
+ run-poe-command :
19
+ env :
20
+ GCP_GSM_CREDENTIALS : ${{ secrets.GCP_GSM_CREDENTIALS }}
21
+ runs-on : ubuntu-latest
22
+ steps :
23
+ - name : Run Poe Slash Command Processor
24
+ uses : aaronsteers/poe-command-processor@v1
25
+ with :
26
+ pr : ${{ github.event.inputs.pr }}
27
+ comment-id : ${{ github.event.inputs.comment-id }}
28
+ github-token : ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
Original file line number Diff line number Diff line change 6
6
7
7
jobs :
8
8
slashCommandDispatch :
9
- # Only allow slash commands on pull request (not on issues)
10
- if : ${{ github.event.issue.pull_request }}
11
9
runs-on : ubuntu-24.04
12
10
steps :
13
11
- name : Slash Command Dispatch
@@ -19,17 +17,25 @@ jobs:
19
17
repository : ${{ github.repository }}
20
18
token : ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
21
19
dispatch-type : workflow
22
- issue-type : pull-request
20
+ issue-type : both
21
+
22
+ # Only run for users with 'write' permission on the main repository
23
+ permission : write
24
+
23
25
commands : |
24
26
autofix
25
27
test
26
28
poetry-lock
29
+ poe
30
+
31
+ # Notes regarding static-args:
32
+ # - Slash commands can be invoked from both issues and comments.
33
+ # - If the slash command is invoked from an issue, we intentionally pass 'null' as the PR number.
34
+ # - Comment ID will always be sent, and this is sufficient to post back status updates to the originating comment.
27
35
static-args : |
28
- pr=${{ github.event.issue.number }}
36
+ pr=${{ github.event.issue.pull_request != null && github.event.issue. number || '' }}
29
37
comment-id=${{ github.event.comment.id }}
30
38
31
- # Only run for users with 'write' permission on the main repository
32
- permission : write
33
39
34
40
- name : Edit comment with error message
35
41
if : steps.dispatch.outputs.error-message
You can’t perform that action at this time.
0 commit comments