Skip to content

Dispatch on code-review comments? #88

Open
@asford

Description

@asford

This is an incredible repo, amazing code and even better docs. 👏👏👏

One minor nitpick, would it be possible to teach the dispatch to operate on PR review comments. Right now github doesn't dispatch an issue_comment event for a "top level" review comment, even though it shows up like a comment in the PR thread. I believe it dispatches a pull_request_review event, and from a quick peak at main.js I don't think slash-command-dispatch will be able to process these events?

// Check required context properties exist (satisfy type checking)
if (
!github.context.payload.action ||
!github.context.payload.issue ||
!github.context.payload.comment
) {
throw new Error('Required context properties are missing.')
}
// Only handle 'created' and 'edited' event types
if (!['created', 'edited'].includes(github.context.payload.action)) {
core.warning(
`Event type '${github.context.payload.action}' not supported.`
)
return
}

@peter-evans Do you think this would be feasible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions