GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Squashed commit of the following: · zerob13/opencode@2034fab

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • github
    • .gitignore
    • README.md
    • action.yml
    • bun.lock
    • index.ts
    • package.json
    • tsconfig.json
  • packages
    • opencode
      • package.json
      • src/cli/cmd
        • github.ts
    • web/src/content/docs/docs
      • github.mdx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎github/.gitignore‎

Copy file name to clipboard
+34Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.eslintcache
27+
.cache
28+
*.tsbuildinfo
29+
30+
# IntelliJ based IDEs
31+
.idea
32+
33+
# Finder (MacOS) folder config
34+
.DS_Store
Collapse file

‎github/README.md‎

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 numberDiff line numberDiff line change
@@ -96,22 +96,22 @@ To test locally:
9696
MODEL=anthropic/claude-sonnet-4-20250514 \
9797
ANTHROPIC_API_KEY=sk-ant-api03-1234567890 \
9898
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
102102
```
103103

104104
- `MODEL`: The model used by opencode. Same as the `MODEL` defined in the GitHub workflow.
105105
- `ANTHROPIC_API_KEY`: Your model provider API key. Same as the keys defined in the GitHub workflow.
106106
- `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`.
110110

111111
### Issue comment event
112112

113113
```
114-
--event '{"eventName":"issue_comment","repo":{"owner":"sst","repo":"hello-world"},"actor":"fwang","payload":{"issue":{"number":4},"comment":{"id":1,"body":"hey opencode, summarize thread"}}}'
114+
MOCK_EVENT='{"eventName":"issue_comment","repo":{"owner":"sst","repo":"hello-world"},"actor":"fwang","payload":{"issue":{"number":4},"comment":{"id":1,"body":"hey opencode, summarize thread"}}}'
115115
```
116116
117117
Replace:
@@ -125,13 +125,13 @@ Replace:
125125
### Issue comment with image attachment.
126126
127127
```
128-
--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 ![Image](https://github.com/user-attachments/assets/xxxxxxxx)"}}}'
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 ![Image](https://github.com/user-attachments/assets/xxxxxxxx)"}}}'
129129
```
130130
131131
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).
132132
133133
### PR comment event
134134
135135
```
136-
--event '{"eventName":"issue_comment","repo":{"owner":"sst","repo":"hello-world"},"actor":"fwang","payload":{"issue":{"number":4,"pull_request":{}},"comment":{"id":1,"body":"hey opencode, summarize thread"}}}'
136+
MOCK_EVENT='{"eventName":"issue_comment","repo":{"owner":"sst","repo":"hello-world"},"actor":"fwang","payload":{"issue":{"number":4,"pull_request":{}},"comment":{"id":1,"body":"hey opencode, summarize thread"}}}'
137137
```
Collapse file

‎github/action.yml‎

Copy file name to clipboardExpand all lines: github/action.yml
+18-4Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ branding:
66

77
inputs:
88
model:
9-
description: "Model to use"
9+
description: "The model to use with opencode. Takes the format of `provider/model`."
1010
required: true
1111

1212
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."
1418
required: false
1519

1620
runs:
@@ -20,10 +24,20 @@ runs:
2024
shell: bash
2125
run: curl -fsSL https://opencode.ai/install | bash
2226

27+
- name: Install bun
28+
shell: bash
29+
run: npm install -g bun
30+
31+
- name: Install dependencies
32+
shell: bash
33+
run: |
34+
cd ${GITHUB_ACTION_PATH}
35+
bun install
36+
2337
- name: Run opencode
2438
shell: bash
25-
id: run_opencode
26-
run: opencode github run
39+
run: bun ${GITHUB_ACTION_PATH}/index.ts
2740
env:
2841
MODEL: ${{ inputs.model }}
2942
SHARE: ${{ inputs.share }}
43+
TOKEN: ${{ inputs.token }}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.