Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/opencode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: opencode

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]

jobs:
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.

runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
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.

with:
persist-credentials: false

- name: Run opencode
uses: anomalyco/opencode/github@latest
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
model: anthropic/claude-haiku-4-5
use_github_token: true
Loading