mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-10-02 09:24:52 +08:00
* feat(action): add optional pr_number input and workflow_run fallback The pull request number was read from the event payload in two places: the fetch step's `github.event.pull_request.number || github.event.issue.number`, and `context.issue.number` in the range and posting steps. Neither resolves on `workflow_run`, whose payload names the pull request only under `workflow_run.pull_requests[0]`. The review therefore ran to completion and the posting step then requested /repos/OWNER/REPO/issues//comments, got a 404, and the findings were lost. "Resolve PR refs" now resolves the number once — the new optional `pr_number` input, then the event payload, then `workflow_run.pull_requests[0].number` — publishes it as $PR_NUMBER, and fails there when nothing resolves or the value is not a PR number, before OCR is installed or any LLM quota is spent. The head fetch, the checkpoint resolver and the posting step all read that one value; runPostReviewComments takes it as an option and still falls back to context.issue.number when a caller omits it. Behavior is unchanged for pull_request, pull_request_target and issue_comment: an unset input falls through to the existing resolution. Closes #1150 * style(action): use strict equality for the pr_number override The review guidelines rule out loose equality, so spell out the null and undefined checks that `!= null` covered.
CI/CD Integration Examples
This directory contains examples for integrating OpenCodeReview (OCR) into various CI/CD pipelines.
Contents
- github_actions/ - GitHub Actions integration example
- gitlab_ci/ - GitLab CI integration example
- bitbucket_pipelines/ - Bitbucket Pipelines integration example
- gitflic_ci/ - GitFlic CI integration example
- gerrit_ci/ - Gerrit (Jenkins / Gerrit Trigger) integration example
Each subdirectory contains its own README with detailed setup instructions.