tools.gitea_tools module

Gitea API tools using per-user access tokens.

Provides repository, issue, PR, commit, file, notification, and star operations via the Gitea REST API. Supports custom base URLs for self-hosted instances. Requires set_user_api_key service=gitea.

async tools.gitea_tools.gitea_list_repos(page=1, limit=20, ctx=None)[source]

List the authenticated user’s Gitea repositories.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_search_repos(q, sort='updated', order='desc', page=1, limit=20, ctx=None)[source]

Search Gitea repositories by keyword.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_get_repo(owner, repo, ctx=None)[source]

Get details of a Gitea repository.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_create_repo(name, description='', private=False, auto_init=True, ctx=None)[source]

Create a new Gitea repository for the authenticated user.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_list_issues(owner, repo, state='open', labels='', page=1, limit=20, ctx=None)[source]

List issues on a Gitea repository.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_get_issue(owner, repo, index, ctx=None)[source]

Get a single issue by index.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_create_issue(owner, repo, title, body='', labels=None, assignees=None, ctx=None)[source]

Create a new issue on a Gitea repository.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_update_issue(owner, repo, index, title=None, body=None, state=None, ctx=None)[source]

Update an existing issue.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_list_pull_requests(owner, repo, state='open', page=1, limit=20, ctx=None)[source]

List pull requests on a Gitea repository.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_get_pull_request(owner, repo, index, ctx=None)[source]

Get details of a specific pull request.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_create_pull_request(owner, repo, title, head, base='main', body='', ctx=None)[source]

Create a new pull request.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_merge_pull_request(owner, repo, index, merge_style='merge', delete_branch_after_merge=False, ctx=None)[source]

Merge a pull request. merge_style: merge, rebase, rebase-merge, squash.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_get_file(owner, repo, path, ref='', ctx=None)[source]

Get the contents of a file or directory listing from a Gitea repository.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_list_commits(owner, repo, sha='', page=1, limit=20, ctx=None)[source]

List commits in a Gitea repository.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_get_commit(owner, repo, sha, ctx=None)[source]

Get a single commit by SHA.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_list_notifications(all_notifications=False, page=1, limit=20, ctx=None)[source]

List the user’s Gitea notifications.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_star_repo(owner, repo, star=True, ctx=None)[source]

Star or unstar a Gitea repository.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_list_branches(owner, repo, page=1, limit=30, ctx=None)[source]

List branches in a Gitea repository.

Return type:

str

Parameters:
async tools.gitea_tools.gitea_create_repo_from_template(template_owner, template_repo, name, description='', private=False, git_content=True, ctx=None)[source]

Create a new repository from a template repository.

Return type:

str

Parameters: