Skip to content

Add initial opencode github action for reviewing PRs#12201

Closed
petebacondarwin wants to merge 6 commits intomainfrom
pbd/ci/opencode
Closed

Add initial opencode github action for reviewing PRs#12201
petebacondarwin wants to merge 6 commits intomainfrom
pbd/ci/opencode

Conversation

@petebacondarwin
Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin commented Jan 28, 2026

Trigger by posting a comment on a PR with /oc or /opencode.
See https://opencode.ai/docs/github/


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: ci workflow change
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: ci workflow change

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

Trigger by posting a comment on a PR with `/oc` or `/opencode`.
@petebacondarwin petebacondarwin requested a review from a team as a code owner January 28, 2026 12:55
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 28, 2026

⚠️ No Changeset found

Latest commit: 27b8edb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View issue and 3 additional flags in Devin Review.

Open in Devin Review

Comment thread .github/workflows/opencode.yml Outdated
@opencode-agent
Copy link
Copy Markdown

User devin-ai-integration[bot] does not have write permissions

github run

Copy link
Copy Markdown
Contributor

@penalosa penalosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's give it a go

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Jan 28, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jan 28, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12201

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12201

miniflare

npm i https://pkg.pr.new/miniflare@12201

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12201

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12201

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12201

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12201

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12201

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12201

wrangler

npm i https://pkg.pr.new/wrangler@12201

commit: 27b8edb

@petebacondarwin
Copy link
Copy Markdown
Contributor Author

/oc is this any good?

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View issues and 5 additional flags in Devin Review.

Open in Devin Review

Comment thread .github/workflows/opencode.yml Outdated
Comment thread .github/workflows/opencode.yml Outdated
@opencode-agent
Copy link
Copy Markdown

User devin-ai-integration[bot] does not have write permissions

github run

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View issues and 5 additional flags in Devin Review.

Open in Devin Review

issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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@v4

But this new workflow uses:

uses: actions/checkout@v6

The 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.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

opencode:
if: |
contains(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, ' /opencode')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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: /opencode should 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 start

Impact

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'

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions
Copy link
Copy Markdown
Contributor

User devin-ai-integration[bot] does not have write permissions

github run

@github-actions
Copy link
Copy Markdown
Contributor

User devin-ai-integration[bot] does not have write permissions

github run

@penalosa
Copy link
Copy Markdown
Contributor

/oc hello

Copy link
Copy Markdown
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try it out

@petebacondarwin
Copy link
Copy Markdown
Contributor Author

Closing for now till we work out how to connect to the AI model from the action.

@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants