The open source coding agent.
TypeScript
tweak: make gh action ignore url mentions of opencode (#1531)
Aiden Clineae6e47bb42bb
diff --git a/.github/workflows/opencode.yml b/.github/workflows/opencode.ymlindex 98431556b3e..cbe35f615bf 100644--- a/.github/workflows/opencode.yml+++ b/.github/workflows/opencode.yml@@ -7,8 +7,10 @@ on:jobs:opencode:if: |- contains(github.event.comment.body, '/oc') ||- contains(github.event.comment.body, '/opencode')+ contains(github.event.comment.body, ' /oc') ||+ startsWith(github.event.comment.body, '/oc') ||+ contains(github.event.comment.body, ' /opencode') ||+ startsWith(github.event.comment.body, '/opencode')runs-on: ubuntu-latestpermissions:contents: read@@ -24,4 +26,4 @@ jobs:env:ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}with:- model: anthropic/claude-sonnet-4-20250514\ No newline at end of file+ model: anthropic/claude-sonnet-4-20250514diff --git a/packages/opencode/src/cli/cmd/github.ts b/packages/opencode/src/cli/cmd/github.tsindex 3c18d1c5f8c..f33cb3ec739 100644--- a/packages/opencode/src/cli/cmd/github.ts+++ b/packages/opencode/src/cli/cmd/github.ts@@ -318,8 +318,10 @@ on:jobs:opencode:if: |- contains(github.event.comment.body, '/oc') ||- contains(github.event.comment.body, '/opencode')+ contains(github.event.comment.body, ' /oc') ||+ startsWith(github.event.comment.body, '/oc') ||+ contains(github.event.comment.body, ' /opencode') ||+ startsWith(github.event.comment.body, '/opencode')runs-on: ubuntu-latestpermissions:contents: read@@ -784,7 +786,7 @@ export const GithubRunCommand = cmd({console.log("Pushing to new branch...")await $`git add .`await $`git commit -m "${summary}-+Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"`await $`git push -u origin ${branch}`}@@ -793,7 +795,7 @@ Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"`console.log("Pushing to local branch...")await $`git add .`await $`git commit -m "${summary}-+Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"`await $`git push`}@@ -805,7 +807,7 @@ Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"`await $`git add .`await $`git commit -m "${summary}-+Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"`await $`git push fork HEAD:${remoteBranch}`}