GeezerVison is showing github.com — tweak: make gh action ignore url mentions of opencode (#1531) · major/opencode@ae6e47b
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/opencode/src/cli/cmd
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/opencode.yml +5-3Lines changed: 5 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
7 | 7 | jobs: |
8 | 8 | opencode: |
9 | 9 | if: | |
10 | | - contains(github.event.comment.body, '/oc') || |
11 | | - contains(github.event.comment.body, '/opencode') |
| 10 | + contains(github.event.comment.body, ' /oc') || |
| 11 | + startsWith(github.event.comment.body, '/oc') || |
| 12 | + contains(github.event.comment.body, ' /opencode') || |
| 13 | + startsWith(github.event.comment.body, '/opencode') |
12 | 14 | runs-on: ubuntu-latest |
13 | 15 | permissions: |
14 | 16 | contents: read |
|
24 | 26 | env: |
25 | 27 | ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} |
26 | 28 | with: |
27 | | - model: anthropic/claude-sonnet-4-20250514 |
| 29 | + model: anthropic/claude-sonnet-4-20250514 |
Collapse file
Copy file name to clipboardExpand all lines: packages/opencode/src/cli/cmd/github.ts +7-5Lines changed: 7 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
318 | 318 | jobs: |
319 | 319 | opencode: |
320 | 320 | if: | |
321 | | - contains(github.event.comment.body, '/oc') || |
322 | | - contains(github.event.comment.body, '/opencode') |
| 321 | + contains(github.event.comment.body, ' /oc') || |
| 322 | + startsWith(github.event.comment.body, '/oc') || |
| 323 | + contains(github.event.comment.body, ' /opencode') || |
| 324 | + startsWith(github.event.comment.body, '/opencode') |
323 | 325 | runs-on: ubuntu-latest |
324 | 326 | permissions: |
325 | 327 | contents: read |
@@ -784,7 +786,7 @@ export const GithubRunCommand = cmd({ |
784 | 786 | console.log("Pushing to new branch...") |
785 | 787 | await $`git add .` |
786 | 788 | await $`git commit -m "${summary} |
787 | | - |
| 789 | +
|
788 | 790 | Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"` |
789 | 791 | await $`git push -u origin ${branch}` |
790 | 792 | } |
@@ -793,7 +795,7 @@ Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"` |
793 | 795 | console.log("Pushing to local branch...") |
794 | 796 | await $`git add .` |
795 | 797 | await $`git commit -m "${summary} |
796 | | - |
| 798 | +
|
797 | 799 | Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"` |
798 | 800 | await $`git push` |
799 | 801 | } |
@@ -805,7 +807,7 @@ Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"` |
805 | 807 |
|
806 | 808 | await $`git add .` |
807 | 809 | await $`git commit -m "${summary} |
808 | | - |
| 810 | +
|
809 | 811 | Co-authored-by: ${actor} <${actor}@users.noreply.github.com>"` |
810 | 812 | await $`git push fork HEAD:${remoteBranch}` |
811 | 813 | } |
|