I tried updating my trigger conditions for the opencode github action as documented below. It successfully triggered the github action, but then would give an error like this.
error: Unsupported event type: pull_request_review
at assertContextEvent (/home/runner/work/_actions/sst/opencode/latest/github/index.ts:268:11)
at /home/runner/work/_actions/sst/opencode/latest/github/index.ts:127:3
The relevant part of my opencode.yml.
on:
issue_comment:
types: [created] # Regular issue & PR top-level comments
pull_request_review_comment:
types: [created] # Inline (diff) code review comments
pull_request_review:
types: [submitted] # Full review (Approve / Comment / Request changes)
jobs:
opencode:
if: |
(
github.event_name == 'issue_comment' &&
(
contains(github.event.comment.body, ' /oc') ||
startsWith(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, ' /opencode') ||
startsWith(github.event.comment.body, '/opencode')
)
) || (
github.event_name == 'pull_request_review_comment' &&
(
contains(github.event.comment.body, ' /oc') ||
startsWith(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, ' /opencode') ||
startsWith(github.event.comment.body, '/opencode')
)
) || (
github.event_name == 'pull_request_review' &&
github.event.review.body != '' &&
(
contains(github.event.review.body, ' /oc') ||
startsWith(github.event.review.body, '/oc') ||
contains(github.event.review.body, ' /opencode') ||
startsWith(github.event.review.body, '/opencode')
)
)
I tried updating my trigger conditions for the opencode github action as documented below. It successfully triggered the github action, but then would give an error like this.
The relevant part of my opencode.yml.