feat(ci): wire OpenCode build agent into GitHub via slash commands and auto PR review - #7
Open
Martins6 wants to merge 3 commits into
Open
feat(ci): wire OpenCode build agent into GitHub via slash commands and auto PR review#7Martins6 wants to merge 3 commits into
Martins6 wants to merge 3 commits into
Conversation
… review
Adds two GitHub Actions workflows that wire the OpenCode `build` agent into
the repo via the official `anomalyco/opencode/github` action:
- .github/workflows/opencode.yml: triggered when `/opencode` or `/oc` appears
in an issue or PR review comment. Read-only permissions + OIDC id-token.
- .github/workflows/opencode-review.yml: automatically reviews every
non-draft PR on open, on each new commit (synchronize), on reopen, and
when moved out of draft. Same prompt re-runs on every push.
Both pin `agent: build`, model `minimax-coding-plan/MiniMax-M3`, and read
the API key from `${{ secrets.MINIMAX_API_KEY }}` (verify the env var name
against `opencode auth login` / models.dev).
README gains a "GitHub Workflow" subsection under Development covering
app install, secret naming, slash-command usage, and auto-review behavior.
Adds feat-opencode-github-workflow.md covering both workflow files, the slash-command trigger, the auto-review on PR open / synchronize / reopen / ready_for_review, the draft-skip guard, the OIDC auth path, and the MINIMAX_API_KEY secret caveat. OVERVIEW.md and LOG-FEATS.md updated to list the new feature.
Owner
Author
|
A pull request has been opened to address this diff/issue.
This PR was opened by an agent. It will not be merged automatically — the review DAG will post its verdict as a separate comment, and merging remains a human decision. |
|
Model not found: minimax-coding-plan/MiniMax-M3. Did you mean: MiniMax-M3? |
Owner
Author
The auto-review workflow run on this branch failed with `Model not found: minimax-coding-plan/MiniMax-M3. Did you mean: MiniMax-M3?` even though the catalog (models.dev) lists that exact provider/model and the env var (MINIMAX_API_KEY) was set. The catalog suggestion proved the catalog lookup found the model, but the opencode server's runtime provider registry didn't include it — same root cause as opencode#7958. The GitHub runner has no local auth/config to fall back on, so the runtime registry stays empty for any provider whose catalog merge didn't populate. Adding a project-level opencode.json that explicitly registers the provider/model forces it into the runtime registry regardless of the catalog fetch. Files: - opencode.json: new, pins minimax-coding-plan provider and MiniMax-M3 - README.md: note about the config under "GitHub Workflow" - docs/features/feat-opencode-github-workflow.md: mention the config
|
ProviderAuthError: Anthropic API key is missing. Pass it using the 'apiKey' parameter or the ANTHROPIC_API_KEY environment variable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two GitHub Actions workflows that wire the OpenCode
buildagent into the repo using the officialanomalyco/opencode/githubaction..github/workflows/opencode.yml— slash-command trigger. Mention/opencodeor/ocin any issue or PR review comment to invoke the agent..github/workflows/opencode-review.yml— automatic code review on PR open, every new commit (synchronize), reopen, and when moved out of draft. Drafts are skipped.Both pin
agent: build, modelminimax-coding-plan/MiniMax-M3, use the OpenCode GitHub App via OIDC (id-token: write), and read-only repo permissions.README.md gains a "GitHub Workflow" subsection documenting app install, secret naming, slash-command usage, and auto-review behavior.
Setup before this PR can be tested
MINIMAX_API_KEY— confirm the exact env var name againstopencode auth loginoutput or models.dev for theminimax-coding-planprovider, and adjust both workflow files if it differs.Commits
b714604feat(ci): add OpenCode GitHub workflows for slash-command and auto PR review6b2b14bdocs(features): document OpenCode GitHub workflow integrationVerification
python3 -c "import yaml; yaml.safe_load(...)"confirms both workflow files parse cleanly.