pipe-cd / pipecd

The One CD for All {applications, platforms, operations}
https://pipecd.dev
Apache License 2.0
1.07k stars 151 forks source link

Add emoji reaction to indicate execution of /pipecd plan-preview command #5107

Open tom-256 opened 2 months ago

tom-256 commented 2 months ago

What would you like to be added: Add emoji reactions to indicate when the /pipecd plan-preview command has been executed in a comment.

Why is this needed: Currently, when a user executes the /pipecd plan-preview command in a comment, there is no immediate visual indication that the command has been received and is being processed. Adding an emoji reaction would provide instant feedback to users, confirming that their command has been recognized by the system. This enhancement would improve the user experience by reducing uncertainty and providing clear visual cues about the status of their actions.

Reference: https://www.runatlantis.io/docs/server-configuration#emoji-reaction

t-kikuc commented 2 months ago

Thank you for your great proposal. I also want any reaction after executing /pipecd plan-preview.

How about adding emoji-reaction section to the usage as below?

The action is hosted in pipe-cd/actions-plan-preview and the usage is described in README.md.

The usage will be like this:

name: PipeCD

on:
  ...

jobs:
  emoji-reaction: # ********** This Part **************
    name: Add Emoji Reaction
    runs-on: ubuntu-latest
    if: "github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/pipecd plan-preview')"
    steps:
      - uses: peter-evans/create-or-update-comment@v4.0.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          comment-id: ${{ github.event.comment.id }}
          reactions: eyes # any emoji

  plan-preview:
    ...

  plan-preview-on-comment:
    ...

The above workflow will add emoji(s) like this before plan-preview begins:

image

See https://github.com/peter-evans/create-or-update-comment for details.

If that's enough, would you open a PR in https://github.com/pipe-cd/actions-plan-preview ?

tom-256 commented 2 months ago

In that use case, it's just reacting in GitHub Actions, so it doesn't guarantee that PipeCD is started. I think a PipeCD implementation is necessary.

However, I consider this feature itself to be of low priority.