open-code-review/.github
Lei Zhang 6b7038b3d3
ci: add GitHub Actions workflow for automated PR review (#61)
* ci: add GitHub Actions workflow for automated PR review

- Trigger on PR opened and issue_comment (/open-code-review)
- Install OCR via npm, configure LLM secrets, run review
- Post inline review comments via GitHub PR review API
- Fallback to individual comments if batch posting fails
- Use commit SHA instead of branch ref to support fork PRs

* ci: use pull_request_target to support fork PR secret access

- Switch from pull_request to pull_request_target trigger
- Add synchronize and reopened event types
- Explicitly checkout PR head SHA (pull_request_target defaults to base)
- This ensures secrets are available for PRs from forked repos

* ci: fix pull_request_target handling for fork PRs

- Narrow trigger types to 'opened' only to reduce redundant runs
- Add explicit fetch of PR head ref to ensure fork commits are available
- Fix event name check from 'pull_request' to 'pull_request_target'
2026-06-06 18:16:08 +08:00
..
ISSUE_TEMPLATE Add issue and PR templates with bilingual contributing guide (#9) 2026-05-30 14:22:50 +08:00
workflows ci: add GitHub Actions workflow for automated PR review (#61) 2026-06-06 18:16:08 +08:00
pull_request_template.md Add issue and PR templates with bilingual contributing guide (#9) 2026-05-30 14:22:50 +08:00