List branches
forgejo_list_branchesList repository branches and view each branch's latest commit and protection status. Use it to verify a branch exists before creating a pull request.
Instructions
Lists the repository's branches with their latest commit and protection status.
Parameters: owner, repo, page, limit, response_format.
Returns: { total, count, page, limit, has_more, branches: [{ name, protected, commit_sha, commit_message }] }
Use it to confirm a branch exists before opening a pull request with forgejo_create_pull_request.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page to fetch, 1 = first. | |
| repo | No | Repository name. Defaults to FORGEJO_DEFAULT_REPO. | |
| limit | No | Items per page (max 50). | |
| owner | No | Repository owner (user or organisation). Defaults to FORGEJO_DEFAULT_OWNER. | |
| response_format | No | 'markdown' for a readable rendering, 'json' for the full data. | markdown |