github_readonly.get_file_contents
Get the contents of a file or directory from a GitHub repository
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Accepts optional git refs such as `refs/tags/{tag}`, `refs/heads/{branch}` or `refs/pull/{pr_number}/head` | |
| sha | No | Accepts optional commit SHA. If specified, it will be used instead of ref | |
| path | No | Path to file/directory | / |
| repo | Yes | Repository name | |
| owner | Yes | Repository owner (username or organization) | |
| fields | No | Subset of fields to return for each entry when the path is a directory. If omitted, all fields are returned. Ignored when the path is a single file. Use this to reduce response size when listing directories and you only need specific fields, e.g. just 'name' and 'type'. |