TypeError: undefined is not an object #6622

Closed
opened 2026-02-16 18:04:47 -05:00 by yindo · 3 comments
Owner

Originally created by @cogni-ai-ee on GitHub (Jan 17, 2026).

Originally assigned to: @rekram1-node on GitHub.

I've used example from https://opencode.ai/docs/github/#pull-request-example
but it didn't work:

ERROR 2026-01-17T18:56:06 +8ms service=default name=TypeError message=undefined is not an object (evaluating 'octoRest.rest') stack=TypeError: undefined is not an object (evaluating 'octoRest.rest')
    at createComment (src/cli/cmd/github.ts:1240:22)
    at createComment (src/cli/cmd/github.ts:1237:36)
    at <anonymous> (src/cli/cmd/github.ts:637:17)
    at processTicksAndRejections (native:7:39) fatal

Usage:

      - uses: anomalyco/opencode/github@latest
        env:
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          model: anthropic/claude-sonnet-4-20250514

It worked after adding:

          use_github_token: true

Should this option be added to the examples, as without it, it doesn't seems to work?

Originally created by @cogni-ai-ee on GitHub (Jan 17, 2026). Originally assigned to: @rekram1-node on GitHub. I've used example from https://opencode.ai/docs/github/#pull-request-example but it didn't work: ``` ERROR 2026-01-17T18:56:06 +8ms service=default name=TypeError message=undefined is not an object (evaluating 'octoRest.rest') stack=TypeError: undefined is not an object (evaluating 'octoRest.rest') at createComment (src/cli/cmd/github.ts:1240:22) at createComment (src/cli/cmd/github.ts:1237:36) at <anonymous> (src/cli/cmd/github.ts:637:17) at processTicksAndRejections (native:7:39) fatal ``` Usage: ``` - uses: anomalyco/opencode/github@latest env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: model: anthropic/claude-sonnet-4-20250514 ``` It worked after adding: ``` use_github_token: true ``` Should this option be added to the examples, as without it, it doesn't seems to work?
yindo added the docs label 2026-02-16 18:04:47 -05:00
yindo closed this issue 2026-02-16 18:04:47 -05:00
Author
Owner

@rekram1-node commented on GitHub (Jan 17, 2026):

yes

@rekram1-node commented on GitHub (Jan 17, 2026): yes
Author
Owner

@rekram1-node commented on GitHub (Jan 17, 2026):

/oc fix example

@rekram1-node commented on GitHub (Jan 17, 2026): /oc fix example
Author
Owner

@opencode-agent[bot] commented on GitHub (Jan 17, 2026):

Created PR #9120

New%20session%20-%202026-01-17T19%3A18%3A21.313Z
opencode session  |  github run

@opencode-agent[bot] commented on GitHub (Jan 17, 2026): Created PR #9120 <a href="https://opencode.ai/s/4mqqnbYj"><img width="200" alt="New%20session%20-%202026-01-17T19%3A18%3A21.313Z" src="https://social-cards.sst.dev/opencode-share/TmV3IHNlc3Npb24gLSAyMDI2LTAxLTE3VDE5OjE4OjIxLjMxM1o=.png?model=opencode/claude-opus-4-5&version=1.1.25&id=4mqqnbYj" /></a> [opencode session](https://opencode.ai/s/4mqqnbYj)&nbsp;&nbsp;|&nbsp;&nbsp;[github run](/anomalyco/opencode/actions/runs/21099558517)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6622