oracle / oracle/macaron

Refactor the git repo preparation

Open
#356 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement git_service
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.