Skip to content

fix(low-code): Fix declarative low-code state migration in SubstreamPartitionRouter #484

fix(low-code): Fix declarative low-code state migration in SubstreamPartitionRouter

fix(low-code): Fix declarative low-code state migration in SubstreamPartitionRouter #484

name: Slash Command Dispatch
on:
issue_comment:
types: [created]
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
id: dispatch
# TODO: Revert to `peter-evans/slash-command-dispatch@v4` after PR merges:
# - https://github.com/peter-evans/slash-command-dispatch/pull/372/files
uses: aaronsteers/slash-command-dispatch@aj/fix/add-dispatched-bool-output
with:
repository: ${{ github.repository }}
token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
dispatch-type: workflow
issue-type: pull-request
commands: |
autofix
test
poetry-lock
static-args: |
pr=${{ 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
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ github.event.comment.id }}
body: |
> Error: ${{ steps.dispatch.outputs.error-message }}
- name: Generate help text
id: help
if: >
startsWith(github.event.comment.body, '/') &&
!steps.dispatch.outputs.dispatched
run: |
HELP_TEXT="The following slash commands are available:
- \`/autofix\` - Corrects any linting or formatting issues
- \`/test\` - Runs the test suite
- \`/poetry-lock\` - Re-locks dependencies and updates the poetry.lock file
- \`/help\` - Shows this help message"
if [[ "${{ github.event.comment.body }}" == "/help" ]]; then
echo "body=$HELP_TEXT" >> $GITHUB_OUTPUT
else
echo "body=It looks like you are trying to enter a slash command. Either the slash command is unrecognized or you don't have access to call it.
$HELP_TEXT" >> $GITHUB_OUTPUT
fi
- name: Post help message
if: >
startsWith(github.event.comment.body, '/') &&
!steps.dispatch.outputs.dispatched
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ github.event.comment.id }}
body: ${{ steps.help.outputs.body }}