Get file or directory contents
get_file_contentsRead a file from a Forgejo/Gitea repository as text or list directory contents; an empty path lists the repo root, and file reads return the blob SHA needed for updates.
Instructions
Read a file (decoded to text) or list a directory. Use path '' for the repository root. File results include the blob sha needed to update the file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Branch, tag or commit SHA (default: repo default branch) | |
| path | No | ||
| repo | Yes | Repository name | |
| owner | Yes | Repository owner (user or organization) |