GitHub Integration is not pushing changes in PRs
In my private repository a PR was opened by the renovate bot, updating a dependency.
This resulted in a test failure, and I described in a comment how I wanted this to be fixed and used /oc fix this.
The opencode.yml workflow was triggered, and according to the logs it fixed the issue, and created a commit:
{"command":"cd /home/runner/work/my-project/my-project && git commit -m \"...\"","description":"Commit the changes"}
Then opencode created the summary and posted this as a comment in the PR.
Unfortunately, the commit was never pushed to the PR branch and seems to be lost.
My configuration:
name: opencode
on:
issue_comment:
types: [created]
jobs:
opencode:
if: |
contains(github.event.comment.body, '/oc') ||
contains(github.event.comment.body, '/opencode')
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run opencode
uses: sst/opencode/github@latest
env:
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
with:
model: openrouter/qwen/qwen3-coder:free
The used opencode version was 0.3.84
hmm that's weird... does this happen everytime?
Think I've hit this too, couldn't find this issue (Thanks bot for telling me): #3893
As far as I can tell it's because the branchIsDirty() check is false because git status --porcelain returns nothing if we've committed the changes, even if they haven't been pushed