diff --git a/aider_gitea/__main__.py b/aider_gitea/__main__.py index 3d1b6ac..130ba94 100644 --- a/aider_gitea/__main__.py +++ b/aider_gitea/__main__.py @@ -30,7 +30,7 @@ def generate_branch_name(issue_number: str, issue_title: str) -> str: logger = logging.getLogger(__name__) -AIDER_TEST="pytest test" +AIDER_TEST="virtualenv venv; source venv/bin/activate; pip install -e .; pytest test" AIDER_LINT="ruff format; ruff check --fix --ignore RUF022 --ignore PGH004; ruff format; ruff check --ignore RUF022 --ignore PGH004;" MODEL = 'o3-mini' @@ -124,6 +124,7 @@ def run_cmd(cmd: list[str], cwd:Path|None=None) -> None: def process_issue(args, tmpdirname: Path, branch_name: str, issue_title: str, issue_description: str, issue_number: str): repo_url = f"{args.gitea_url}:{args.owner}/{args.repo}.git".replace('https://', 'git@') run_cmd(["git", "clone", repo_url, tmpdirname]) + run_cmd(['bash', '-c', AIDER_TEST], tmpdirname) run_cmd(["git", "checkout", args.base_branch], tmpdirname) run_cmd(["git", "checkout", "-b", branch_name], tmpdirname) run_cmd(create_aider_command(f'# {issue_title}\n{issue_description}'), tmpdirname)