From 37112e2238b4a9879d9cc2cd15007f0d580c24f8 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 05:18:12 +0000 Subject: [PATCH 1/3] feat: use forked slash-command-dispatch with dispatched boolean Co-Authored-By: Aaron Steers --- .github/workflows/slash_command_dispatch.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/slash_command_dispatch.yml b/.github/workflows/slash_command_dispatch.yml index 2a268cbf0..1e1237f0b 100644 --- a/.github/workflows/slash_command_dispatch.yml +++ b/.github/workflows/slash_command_dispatch.yml @@ -12,10 +12,11 @@ jobs: outputs: error-message: ${{ steps.dispatch.outputs.error-message }} command: ${{ steps.dispatch.outputs.command }} + dispatched: ${{ steps.dispatch.outputs.dispatched }} steps: - name: Slash Command Dispatch id: dispatch - uses: peter-evans/slash-command-dispatch@v4 + uses: aaronsteers/slash-command-dispatch@aj/fix/add-dispatched-bool-output with: repository: ${{ github.repository }} token: ${{ secrets.GH_PAT_MAINTENANCE_OCTAVIA }} @@ -45,8 +46,7 @@ jobs: if: > github.event.issue.pull_request && startsWith(github.event.comment.body, '/') && - !needs.slashCommandDispatch.outputs.command && - !needs.slashCommandDispatch.outputs.error-message + !needs.slashCommandDispatch.outputs.dispatched runs-on: ubuntu-24.04 steps: - name: Generate help text From 227f698eafd8344380084f0ddb3d96acf007327c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 06:03:46 +0000 Subject: [PATCH 2/3] refactor: combine slash command jobs into single job steps Co-Authored-By: Aaron Steers --- .github/workflows/slash_command_dispatch.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/slash_command_dispatch.yml b/.github/workflows/slash_command_dispatch.yml index 1e1237f0b..d0c8adf9a 100644 --- a/.github/workflows/slash_command_dispatch.yml +++ b/.github/workflows/slash_command_dispatch.yml @@ -9,10 +9,6 @@ jobs: # Only allow slash commands on pull request (not on issues) if: ${{ github.event.issue.pull_request }} runs-on: ubuntu-24.04 - outputs: - error-message: ${{ steps.dispatch.outputs.error-message }} - command: ${{ steps.dispatch.outputs.command }} - dispatched: ${{ steps.dispatch.outputs.dispatched }} steps: - name: Slash Command Dispatch id: dispatch @@ -41,16 +37,11 @@ jobs: body: | > Error: ${{ steps.dispatch.outputs.error-message }} - unrecognizedSlashCommand: - needs: slashCommandDispatch - if: > - github.event.issue.pull_request && - startsWith(github.event.comment.body, '/') && - !needs.slashCommandDispatch.outputs.dispatched - runs-on: ubuntu-24.04 - steps: - 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: @@ -68,6 +59,9 @@ jobs: 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 }} From 90cbe5c5414ce9d7bdcc7bfb93b243ba224c65cf Mon Sep 17 00:00:00 2001 From: "Aaron (\"AJ\") Steers" Date: Thu, 23 Jan 2025 22:21:33 -0800 Subject: [PATCH 3/3] Apply suggestions from code review --- .github/workflows/slash_command_dispatch.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/slash_command_dispatch.yml b/.github/workflows/slash_command_dispatch.yml index d0c8adf9a..4b1f2b21a 100644 --- a/.github/workflows/slash_command_dispatch.yml +++ b/.github/workflows/slash_command_dispatch.yml @@ -12,6 +12,8 @@ jobs: 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 }}