Refactor the git repo preparation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 210
- Forks
- 36
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 2
Description
Currently the _prepare_repo method is implemented as part of the analyzer module, but it would make more sense to move it as a git_service method. Also, the current logic of handling locally cloned vs remote repositories is entangled and it would be nice to separate them to make the code more maintainable. A TODO item is added in this PR to address this refactoring.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/macaron/slsa_analyzer/analyzer.py at _prepare_repo and review the TODO added in pull request 354. Trace how locally cloned and remote repositories are currently handled, then identify the existing git_service entry point. Done means the preparation logic is moved there and the two repository paths are separated without changing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100