alibaba / alibaba/open-code-review
Provide On-demand checkout way in GitLab Merge Request
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 1.8k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 116
Description
### Problem Statement
Currently we only checkout 1 depth in code review job to reduce gitlab server stress like this
```
ai_code_review:
stage: verify
variables:
GIT_DEPTH: "1"
allow_failure: true
timeout: 15m
```
But ocr requires all codes between merge base to head sha exists.
### Proposed Solution
I hope there's a way to let ocr fetch the required commit on-demand so I don't need to set a high GIT_DEPTH value
### Alternatives Considered
_No response_
### Affected Area
CLI / Commands
### Additional Context
_No response_
Contributor guide
Research direction
Start with the CLI/Commands area and trace how GitLab merge-request reviews currently use the one-commit checkout described in the issue. Verify the behavior with a shallow checkout containing only the merge request head, then confirm that the review can fetch the required commits on demand without increasing GIT_DEPTH.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, gitlab, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100