Skip to content

Commit b1824c6

Browse files
feat: combine slash command jobs into single job steps (#266)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Aaron <AJ> Steers <[email protected]>
1 parent 4ea9d94 commit b1824c6

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

.github/workflows/slash_command_dispatch.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ jobs:
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
@@ -68,6 +61,9 @@ jobs:
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

Comments
 (0)