Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/poe-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: On-Demand Poe Task

on:
workflow_dispatch:
inputs:
comment-id:
description: "Optional comment-id of the slash command. Ignore if not applicable."
required: false
pr:
description: "PR Number"
required: false

permissions:
contents: write
pull-requests: write

jobs:
run-poe-command:
env:
GCP_GSM_CREDENTIALS: ${{ secrets.GCP_GSM_CREDENTIALS }}
runs-on: ubuntu-latest
steps:
- name: Run Poe Slash Command Processor
uses: aaronsteers/poe-command-processor@v1
with:
pr: ${{ github.event.inputs.pr }}
comment-id: ${{ github.event.inputs.comment-id }}
github-token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
18 changes: 12 additions & 6 deletions .github/workflows/slash_command_dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on:

jobs:
slashCommandDispatch:
# Only allow slash commands on pull request (not on issues)
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-24.04
steps:
- name: Slash Command Dispatch
Expand All @@ -19,17 +17,25 @@ jobs:
repository: ${{ github.repository }}
token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
dispatch-type: workflow
issue-type: pull-request
issue-type: both

# Only run for users with 'write' permission on the main repository
permission: write

commands: |
autofix
test
poetry-lock
poe

# Notes regarding static-args:
# - Slash commands can be invoked from both issues and comments.
# - If the slash command is invoked from an issue, we intentionally pass 'null' as the PR number.
# - Comment ID will always be sent, and this is sufficient to post back status updates to the originating comment.
static-args: |
pr=${{ github.event.issue.number }}
pr=${{ github.event.issue.pull_request != null && github.event.issue.number || '' }}
comment-id=${{ github.event.comment.id }}

# Only run for users with 'write' permission on the main repository
permission: write

- name: Edit comment with error message
if: steps.dispatch.outputs.error-message
Expand Down
Loading