diff --git a/aider_gitea/__init__.py b/aider_gitea/__init__.py index 481dc48..2e67cc9 100644 --- a/aider_gitea/__init__.py +++ b/aider_gitea/__init__.py @@ -82,14 +82,14 @@ logger = logging.getLogger(__name__) def generate_branch_name(issue_number: str, issue_title: str) -> str: """Create a branch name by sanitizing the issue title. - + Non-alphanumeric characters (except spaces) are removed, the text is lowercased, and spaces are replaced with dashes. - + Args: issue_number: The issue number to include in the branch name. issue_title: The issue title to sanitize and include in the branch name. - + Returns: A sanitized branch name combining the issue number and title. """ @@ -196,12 +196,12 @@ def push_changes( def has_commits_on_branch(cwd: Path, base_branch: str, current_branch: str) -> bool: """Check if there are any commits on the current branch that aren't in the base branch. - + Args: cwd: The current working directory (repository path). base_branch: The name of the base branch to compare against. current_branch: The name of the current branch to check for commits. - + Returns: True if there are commits on the current branch not in the base branch, False otherwise. """ @@ -221,12 +221,12 @@ def has_commits_on_branch(cwd: Path, base_branch: str, current_branch: str) -> b def run_cmd(cmd: list[str], cwd: Path | None = None, check=True) -> bool: """Run a shell command and return its success status. - + Args: cmd: The command to run as a list of strings. cwd: The directory to run the command in. check: Whether to raise an exception if the command fails. - + Returns: True if the command succeeded, False otherwise. """ @@ -280,7 +280,7 @@ def solve_issue_in_repository( def handle_issues(args, client, seen_issues_db): """Process all open issues with the 'aider' label. - + Args: args: Command line arguments. client: The Gitea client instance.