diff --git a/.github/workflows/opencode-review.yml b/.github/workflows/opencode-review.yml new file mode 100644 index 0000000..5dc113e --- /dev/null +++ b/.github/workflows/opencode-review.yml @@ -0,0 +1,26 @@ +name: opencode-review + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + review: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + pull-requests: write + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: anomalyco/opencode/github@latest + with: + model: opencode/big-pickle + share: false + prompt: | + Review this pull request: + - Check for code quality issues + - Look for potential bugs + - Suggest improvements diff --git a/.github/workflows/opencode.yml b/.github/workflows/opencode.yml index 89f73bc..ed509e6 100644 --- a/.github/workflows/opencode.yml +++ b/.github/workflows/opencode.yml @@ -1,26 +1,28 @@ -name: opencode-review +name: opencode on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] jobs: - review: + opencode: + if: | + contains(github.event.comment.body, '/oc') || + contains(github.event.comment.body, '/opencode') runs-on: ubuntu-latest permissions: id-token: write - contents: read - pull-requests: read steps: - - uses: actions/checkout@v6 + - name: Checkout repository + uses: actions/checkout@v6 with: + fetch-depth: 1 persist-credentials: false - - uses: anomalyco/opencode/github@latest + + - name: Run OpenCode + uses: anomalyco/opencode/github@latest with: model: opencode/big-pickle share: false - prompt: | - Review this pull request: - - Check for code quality issues - - Look for potential bugs - - Suggest improvements \ No newline at end of file diff --git a/.github/workflows/skill-update.yml b/.github/workflows/skill-update.yml new file mode 100644 index 0000000..1330c3f --- /dev/null +++ b/.github/workflows/skill-update.yml @@ -0,0 +1,44 @@ +name: Skill Update + +on: + schedule: + - cron: '0 5 * * 1-5' + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Install official Flutter skills + run: npx skills add flutter/skills --skill '*' --agent universal + + - name: Check for changes + id: check + run: | + if ! git diff --quiet HEAD; then + echo "changed=true" >> "$GITHUB_OUTPUT" + else + echo "changed=false" >> "$GITHUB_OUTPUT" + fi + + - name: Create Pull Request + if: steps.check.outputs.changed == 'true' + uses: peter-evans/create-pull-request@v7 + with: + commit-message: "chore: update opencode skills" + branch: "chore/update-skills" + title: "chore: update opencode skills" + body: | + Automated PR to review and update opencode skills. + + ## Checklist + - [ ] Review `.agents/` and `skills-lock.json` for official skill changes + - [ ] Review `.opencode/skills/` for project skill changes + - [ ] Verify test commands + - [ ] Document any new conventions