Openpieces logoopenpieces
Back to marketplace

Git Code Controller

ACTION

GitHub repo controller — create branches, read project structure, read file contents, batch create/update/delete files and push to branches in a single commit. Used by the Orchestrator AI to code on any branch programmatically.

Sydney0 installs0 starsPublished 5/3/2026 · 28d ago

Endpoints

· 12
GET/repo/branches

Input Schema

{
  "type": "object",
  "required": [],
  "properties": {
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    }
  }
}
GET/repo/actions/logs

Input Schema

{
  "type": "object",
  "required": [],
  "properties": {
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "branch": {
      "type": "string",
      "description": "Branch to check (default: main)"
    }
  }
}
GET/repo/actions/status

Input Schema

{
  "type": "object",
  "required": [],
  "properties": {
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "branch": {
      "type": "string",
      "description": "Branch to check (default: main)"
    }
  }
}
POST/repo/pull-request

Input Schema

{
  "type": "object",
  "required": [
    "title",
    "head",
    "base"
  ],
  "properties": {
    "base": {
      "type": "string",
      "description": "The name of the branch you want the changes pulled into"
    },
    "body": {
      "type": "string",
      "description": "Pull request body in markdown"
    },
    "head": {
      "type": "string",
      "description": "The name of the branch where changes are implemented"
    },
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "title": {
      "type": "string",
      "description": "Pull request title"
    }
  }
}
GET/repo/file

Input Schema

{
  "type": "object",
  "required": [
    "path"
  ],
  "properties": {
    "path": {
      "type": "string",
      "description": "File path (e.g., src/index.ts)"
    },
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "lines": {
      "type": "string",
      "description": "Line range to return, e.g. '20-70', '20', '-50', '20-' (1-indexed, optional)"
    },
    "branch": {
      "type": "string",
      "description": "Branch to read from (default: main)"
    }
  }
}
GET/repo/tree

Input Schema

{
  "type": "object",
  "required": [],
  "properties": {
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "branch": {
      "type": "string",
      "description": "The branch to inspect (default: main)"
    }
  }
}
POST/repo/branch

Input Schema

{
  "type": "object",
  "required": [
    "branch"
  ],
  "properties": {
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "branch": {
      "type": "string",
      "description": "Name of the new branch"
    },
    "fromBranch": {
      "type": "string",
      "description": "Source branch to fork from (default: main)"
    }
  }
}
POST/repo/read-multiple

Input Schema

{
  "type": "object",
  "required": [
    "paths"
  ],
  "properties": {
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "paths": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "string",
            "description": "File path"
          },
          {
            "type": "object",
            "required": [
              "path"
            ],
            "properties": {
              "path": {
                "type": "string",
                "description": "File path"
              },
              "lines": {
                "type": "string",
                "description": "Line range to return, e.g. '20-70', '20', '-50', '20-'"
              }
            }
          }
        ]
      },
      "description": "List of file paths (strings) or objects with path and optional lines"
    },
    "branch": {
      "type": "string",
      "description": "Branch to read from (default: main)"
    }
  }
}
POST/repo/commit

Input Schema

{
  "type": "object",
  "required": [
    "branch",
    "message",
    "changes"
  ],
  "properties": {
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "branch": {
      "type": "string",
      "description": "Target branch"
    },
    "changes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "action",
          "path"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "File path in repo"
          },
          "action": {
            "enum": [
              "create",
              "update",
              "delete"
            ],
            "type": "string",
            "description": "Type of change"
          },
          "content": {
            "type": "string",
            "description": "File content (required for create/update)"
          }
        }
      },
      "description": "Array of file changes"
    },
    "message": {
      "type": "string",
      "description": "Commit message"
    }
  }
}
GET/repo/search

Input Schema

{
  "type": "object",
  "required": [
    "q"
  ],
  "properties": {
    "q": {
      "type": "string",
      "description": "The search query (e.g., 'TODO', 'function getUsers')"
    },
    "org": {
      "type": "string",
      "description": "Scope to an organization (e.g., 'microsoft')"
    },
    "page": {
      "type": "integer",
      "description": "Page number (default: 1)"
    },
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "user": {
      "type": "string",
      "description": "Scope to a user (e.g., 'torvalds')"
    },
    "per_page": {
      "type": "integer",
      "description": "Results per page (default: 30, max: 100)"
    },
    "text_match": {
      "type": "boolean",
      "description": "If true, include text-match metadata with occurrence indices and fragments (default: false)"
    }
  }
}
GET/repos

Input Schema

{
  "type": "object",
  "required": [],
  "properties": {}
}
POST/repo/replace-lines

Input Schema

{
  "type": "object",
  "required": [
    "path",
    "startLine",
    "endLine",
    "newContent"
  ],
  "properties": {
    "path": {
      "type": "string",
      "description": "File path in the repository (e.g., src/index.ts)"
    },
    "repo": {
      "type": "string",
      "description": "Target repo in format 'owner/repo'. Defaults to GITHUB_REPO_OWNER/GITHUB_REPO_NAME if set."
    },
    "branch": {
      "type": "string",
      "description": "Branch to operate on (default: main)"
    },
    "endLine": {
      "type": "integer",
      "description": "Last line to replace (1-indexed, inclusive)"
    },
    "message": {
      "type": "string",
      "description": "Commit message (defaults to 'Replace lines {startLine}-{endLine} in {path}')"
    },
    "startLine": {
      "type": "integer",
      "description": "First line to replace (1-indexed, inclusive)"
    },
    "newContent": {
      "type": "string",
      "description": "New content to replace the specified line range with"
    }
  }
}

Required Secrets

· 1
GITHUB_TOKEN

Similar ACTION Pieces