Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Required context properties are missing. #328

Closed
vidhya03 opened this issue Mar 7, 2024 · 1 comment
Closed

Error: Required context properties are missing. #328

vidhya03 opened this issue Mar 7, 2024 · 1 comment

Comments

@vidhya03
Copy link

vidhya03 commented Mar 7, 2024

I am following up on the getting started documentations
It was worked however few days later getting this issue. can someone point me what am i missing here.  

name: Slash Command Dispatch
on:
  pull_request:
    types: [opened, synchronize]
  issue_comment:
    types: [created]
jobs:
  slashCommandDispatch:
    runs-on: ["onprem", "sci"]
    steps:
      - name: Echo Repository
        run: |
         echo "The repository is: ${{ github.repository }}"
      - name: Slash Command Dispatch
        id: scd
        uses: peter-evans/slash-command-dispatch@v4
        with:
          token: ${{ secrets.PAT }}
          commands: example          
      - name: Check error message
        run: |
          echo "The error message is: ${{ steps.scd.outputs.error-message }}"          
      - name: Edit comment with error message
        if: steps.scd.outputs.error-message
        uses: peter-evans/create-or-update-comment@v4
        with:
          comment-id: ${{ github.event.comment.id }}
          body: |
            > ${{ steps.scd.outputs.error-message }}

how to solve this error

image

@peter-evans
Copy link
Owner

Hi @vidhya03

You can't run this action on the following events. It's designed to run on issue_comment.

  pull_request:
    types: [opened, synchronize]

Also, the action creates a repository_dispatch event. You need to have a workflow that is triggered by that event.

I suggest doing the getting started tutorial so that you have a working base. Then you can make changes slowly to understand how it works.
https://github.com/peter-evans/slash-command-dispatch/blob/main/docs/getting-started.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants