Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeAtomic
LibraryApp-github
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
ownerstringYes—Repository owner
repostringYes—Repository name
shastringYes—Blob SHA

Output Schema ​

FieldTypeRequiredDefaultDescription
ownerstringNo——
repostringNo——
contentstringNo——
sizeintegerNo——
shastringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——
failed_layerjsonNo——
failed_stepjsonNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

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"
  }
}