fix: fix import error by defining functions at module level in __main__.py

This commit is contained in:
Jon Michael Aanes (aider) 2025-04-13 17:26:18 +02:00
parent c88ec8372f
commit 2eda0f1728

View File

@ -160,8 +160,11 @@ def load_issue_from_sqlite(issue_number: str, db_path: Path) -> tuple[str, str]:
return result
else:
raise ValueError(f"Issue {issue_number} not found in the database.")
return result
else:
raise ValueError(f"Issue {issue_number} not found in the database.")
def parse_args():
parser = argparse.ArgumentParser(description="Download issues and create pull requests for a Gitea repository.")
parser.add_argument("--gitea-url", required=True, help="Base URL for the Gitea instance, e.g., https://gitfub.space/api/v1")
parser.add_argument("--owner", required=True, help="Owner of the repository")
parser.add_argument("--repo", required=True, help="Repository name")
parser.add_argument("--base-branch", default="main", help="Base branch to use for new branches (default: main)")