github.code.get_blob ​
Fetch decoded blob content by SHA (handles files > 1MB)
Fetch the decoded content of a git blob by its SHA.
Wraps the Git Blobs API (GET /repos/{owner}/{repo}/git/blobs/{sha}). Unlike github.code.get_file (Contents API, which truncates files over 1MB), the blobs endpoint serves files up to 100MB — so this is the reliable way to read every manifest a github.code.get_tree listing returned, regardless of size.
Inputs:
- owner: Repository owner (required).
- repo: Repository name (required).
- sha: Blob SHA (required) — typically from a github.code.get_tree entry.
Outputs (terminal state_data):
- content: str — decoded UTF-8 content (base64-decoded from the API).
- size: int — blob size in bytes.
- sha: str — the blob SHA (echoed).
Plugin required: github auth via installation_bearer (see _auth.py).
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-github |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
owner | string | Yes | — | Repository owner |
repo | string | Yes | — | Repository name |
sha | string | Yes | — | Blob SHA |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
owner | string | No | — | — |
repo | string | No | — | — |
content | string | No | — | — |
size | integer | No | — | — |
sha | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_layer | json | No | — | — |
failed_step | json | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "github.code.get_blob",
"initial_data": {
"owner": "value",
"repo": "value",
"sha": "value"
}
}