You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: github/README.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,22 +96,22 @@ To test locally:
96
96
MODEL=anthropic/claude-sonnet-4-20250514 \
97
97
ANTHROPIC_API_KEY=sk-ant-api03-1234567890 \
98
98
GITHUB_RUN_ID=dummy \
99
-
bun /path/to/opencode/packages/opencode/src/index.ts github run \
100
-
--token 'github_pat_1234567890' \
101
-
--event '{"eventName":"issue_comment",...}'
99
+
MOCK_TOKEN=github_pat_1234567890 \
100
+
MOCK_EVENT='{"eventName":"issue_comment",...}' \
101
+
bun /path/to/opencode/github/index.ts
102
102
```
103
103
104
104
- `MODEL`: The model used by opencode. Same as the `MODEL` defined in the GitHub workflow.
105
105
- `ANTHROPIC_API_KEY`: Your model provider API key. Same as the keys defined in the GitHub workflow.
106
106
- `GITHUB_RUN_ID`: Dummy value to emulate GitHub action environment.
107
-
- `/path/to/opencode`: Path to your cloned opencode repo. `bun /path/to/opencode/packages/opencode/src/index.ts` runs your local version of `opencode`.
108
-
- `--token`: A GitHub persontal access token. This token is used to verify you have `admin` or `write` access to the test repo. Generate a token [here](https://github.com/settings/personal-access-tokens).
109
-
- `--event`: Mock GitHub event payload (see templates below).
107
+
- `MOCK_TOKEN`: A GitHub persontal access token. This token is used to verify you have `admin` or `write` access to the test repo. Generate a token [here](https://github.com/settings/personal-access-tokens).
108
+
- `MOCK_EVENT`: Mock GitHub event payload (see templates below).
109
+
- `/path/to/opencode`: Path to your cloned opencode repo. `bun /path/to/opencode/github/index.ts` runs your local version of `opencode`.
--event '{"eventName":"issue_comment","repo":{"owner":"sst","repo":"hello-world"},"actor":"fwang","payload":{"issue":{"number":4},"comment":{"id":1,"body":"hey opencode, what is in my image "}}}'
128
+
MOCK_EVENT='{"eventName":"issue_comment","repo":{"owner":"sst","repo":"hello-world"},"actor":"fwang","payload":{"issue":{"number":4},"comment":{"id":1,"body":"hey opencode, what is in my image "}}}'
129
129
```
130
130
131
131
Replace the image URL `https://github.com/user-attachments/assets/xxxxxxxx` with a valid GitHub attachment (you can generate one by commenting with an image in any issue).
Copy file name to clipboardExpand all lines: github/action.yml
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,15 @@ branding:
6
6
7
7
inputs:
8
8
model:
9
-
description: "Model to use"
9
+
description: "The model to use with opencode. Takes the format of `provider/model`."
10
10
required: true
11
11
12
12
share:
13
-
description: "Share the opencode session (defaults to true for public repos)"
13
+
description: "Whether to share the opencode session. Defaults to true for public repositories."
14
+
required: false
15
+
16
+
token:
17
+
description: "Optional GitHub access token for performing operations such as creating comments, committing changes, and opening pull requests. Defaults to the installation access token from the opencode GitHub App."
0 commit comments