diff --git a/.agents/skills/snapshot-codereview-guide.md b/.agents/skills/snapshot-codereview-guide.md new file mode 100644 index 000000000..552a43737 --- /dev/null +++ b/.agents/skills/snapshot-codereview-guide.md @@ -0,0 +1,34 @@ +--- +name: snapshot-codereview-guide +description: Snapshot code review guidelines +triggers: + - /codereview +--- + +# SQRL Snapshot Code Review Guidelines + +# Repository Code Review Guidelines + +You are reviewing code for SQRL. Follow these guidelines: + +## Review Decisions + +### When to APPROVE +- Change is not touching snapshot files +- Change that contains snapshot updates and snapshot content update looks good based on the core logic changes + +### When to COMMENT +- A snapshot change contains updates that are undesirable +- A previously successful snapshot now contains a failure and the core logic does not indicate why +- A previously failing snapshot now contains a success and the core logic does not indicate why + +## Core Principles + +1. **SQRL Snapshot Files**: Any file with a `.snapshot` extension that contains the snapshot data +2. **Unit Test Snapshot Files**: Any `.txt` files under the `sqrl-testing/sqrl-testing-integration/src/test/resources/snapshots/com/datasqrl` directory + +## What to Check + +- **[Failing Snapshot]**: A previously succeeding snapshot now contains a failure and the core logic changes do not indicate that +- **[Succeeding Snapshot]**: A previously failing snapshot now contains a success and the core logic changes do not indicate that +- **[Snapshot Data Changes]**: A snapshot file contains updates (e.g., new data columns, changed format) that are not related to the core logic diff --git a/.github/workflows/snapshot-pr-review.yml b/.github/workflows/snapshot-pr-review.yml new file mode 100644 index 000000000..ff8b6e9eb --- /dev/null +++ b/.github/workflows/snapshot-pr-review.yml @@ -0,0 +1,26 @@ +name: Snapshot PR Review + +on: + pull_request_target: + types: [ opened, ready_for_review, labeled, review_requested ] + +permissions: + contents: read + pull-requests: write + issues: write + +jobs: + pr-review: + if: | + (github.event.action == 'opened' && github.event.pull_request.draft == false) + || github.event.action == 'ready_for_review' + || github.event.label.name == 'review-this' + || github.event.requested_reviewer.login == 'openhands-agent' + runs-on: ubuntu-latest + steps: + - name: Run PR Review + uses: OpenHands/extensions/plugins/pr-review@main + with: + llm-model: openai/gpt-5.5 + llm-api-key: ${{ secrets.LLM_API_KEY }} + github-token: ${{ secrets.GITHUB_TOKEN }}