99 # Only allow slash commands on pull request (not on issues)
1010 if : ${{ github.event.issue.pull_request }}
1111 runs-on : ubuntu-24.04
12- outputs :
13- error-message : ${{ steps.dispatch.outputs.error-message }}
14- command : ${{ steps.dispatch.outputs.command }}
1512 steps :
1613 - name : Slash Command Dispatch
1714 id : dispatch
18- uses : peter-evans/slash-command-dispatch@v4
15+ # TODO: Revert to `peter-evans/slash-command-dispatch@v4` after PR merges:
16+ # - https://github.com/peter-evans/slash-command-dispatch/pull/372/files
17+ uses : aaronsteers/slash-command-dispatch@aj/fix/add-dispatched-bool-output
1918 with :
2019 repository : ${{ github.repository }}
2120 token : ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }}
@@ -40,17 +39,11 @@ jobs:
4039 body : |
4140 > Error: ${{ steps.dispatch.outputs.error-message }}
4241
43- unrecognizedSlashCommand :
44- needs : slashCommandDispatch
45- if : >
46- github.event.issue.pull_request &&
47- startsWith(github.event.comment.body, '/') &&
48- !needs.slashCommandDispatch.outputs.command &&
49- !needs.slashCommandDispatch.outputs.error-message
50- runs-on : ubuntu-24.04
51- steps :
5242 - name : Generate help text
5343 id : help
44+ if : >
45+ startsWith(github.event.comment.body, '/') &&
46+ !steps.dispatch.outputs.dispatched
5447 run : |
5548 HELP_TEXT="The following slash commands are available:
5649
6861 fi
6962
7063 - name : Post help message
64+ if : >
65+ startsWith(github.event.comment.body, '/') &&
66+ !steps.dispatch.outputs.dispatched
7167 uses : peter-evans/create-or-update-comment@v4
7268 with :
7369 comment-id : ${{ github.event.comment.id }}
0 commit comments