Add initial opencode github action for reviewing PRs#12201
Add initial opencode github action for reviewing PRs#12201petebacondarwin wants to merge 6 commits intomainfrom
Conversation
Trigger by posting a comment on a PR with `/oc` or `/opencode`.
|
|
User devin-ai-integration[bot] does not have write permissions |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
/oc is this any good? |
|
User devin-ai-integration[bot] does not have write permissions |
…opencode action itself does a more refined check
| issues: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 |
There was a problem hiding this comment.
🔴 Non-existent actions/checkout@v6 version will cause workflow failure
The workflow uses actions/checkout@v6 which does not exist. The latest stable version is v4.
Click to expand
Impact
The workflow will fail immediately when triggered because GitHub Actions cannot find version 6 of the checkout action.
Evidence
All other workflows in this repository use actions/checkout@v4:
# From other workflows in .github/workflows/
uses: actions/checkout@v4But this new workflow uses:
uses: actions/checkout@v6The actions/checkout repository only has versions up to v4 as of the current date.
Recommendation: Change actions/checkout@v6 to actions/checkout@v4 to match the rest of the repository's workflows.
Was this helpful? React with 👍 or 👎 to provide feedback.
| opencode: | ||
| if: | | ||
| contains(github.event.comment.body, '/oc') || | ||
| contains(github.event.comment.body, ' /opencode') |
There was a problem hiding this comment.
🔴 Leading space in /opencode trigger prevents activation at comment start
The condition contains(github.event.comment.body, ' /opencode') includes a leading space, so /opencode at the beginning of a comment will not trigger the workflow.
Click to expand
Actual vs Expected Behavior
- Actual: A comment starting with
/opencode(e.g.,/opencode please review) will NOT trigger the workflow - Expected:
/opencodeshould work at any position in the comment, just like/oc
Inconsistency
Line 12 uses contains(github.event.comment.body, '/oc') without a leading space, so /oc works anywhere.
Line 13 uses contains(github.event.comment.body, ' /opencode') with a leading space, creating inconsistent behavior.
if: |
contains(github.event.comment.body, '/oc') || # Works at start
contains(github.event.comment.body, ' /opencode') # Does NOT work at startImpact
Users who type /opencode at the start of their comment (the most natural way to invoke a command) will find the workflow doesn't trigger, leading to confusion.
Recommendation: Remove the leading space: change ' /opencode' to '/opencode'
Was this helpful? React with 👍 or 👎 to provide feedback.
|
User devin-ai-integration[bot] does not have write permissions |
|
User devin-ai-integration[bot] does not have write permissions |
|
/oc hello |
|
Closing for now till we work out how to connect to the AI model from the action. |
Trigger by posting a comment on a PR with
/ocor/opencode.See https://opencode.ai/docs/github/
A picture of a cute animal (not mandatory, but encouraged)