From 903973d7f503acf012fd6d28fdb5628fe2847c4c Mon Sep 17 00:00:00 2001 From: "Jon Michael Aanes (aider)" Date: Sun, 13 Apr 2025 18:41:54 +0200 Subject: [PATCH] docs: extend documentation with comprehensive usage examples and environment config --- aider_gitea/__init__.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/aider_gitea/__init__.py b/aider_gitea/__init__.py index 7495ff8..49a9b61 100644 --- a/aider_gitea/__init__.py +++ b/aider_gitea/__init__.py @@ -20,6 +20,43 @@ python -m aider_gitea # Specify custom repository and owner python -m aider_gitea --owner myorg --repo myproject + +# Use a custom Gitea URL +python -m aider_gitea --gitea-url https://gitea.example.com + +# Specify a different base branch +python -m aider_gitea --base-branch develop +``` + +### Python API + +```python +from aider_gitea import solve_issue_in_repository +from pathlib import Path + +# Solve an issue programmatically +args = argparse.Namespace( + gitea_url="https://gitea.example.com", + owner="myorg", + repo="myproject", + base_branch="main" +) + +solve_issue_in_repository( + args, + Path("/path/to/repo"), + "issue-123-fix-bug", + "Fix critical bug", + "The application crashes when processing large files", + "123" +) +``` + +### Environment Configuration + +The tool uses environment variables for sensitive information: +- `GITEA_TOKEN`: Your Gitea API token +- `LLM_API_KEY`: API key for the language model used by Aider ``` """