Chat with Code | Repo Assistant for Githu b

Chat with Code | Repo Assistant for Githu b · GPT アクション

GitHub Repository Reader

An OpenAPI specification for a GPT to read and understand GitHub repository content.

  • GET /repos/{owner}/{repo}/contents/List all files and directories in a repository
  • GET /repos/{owner}/{repo}/contents/{path}Get contents of a specific file or directory in a repository
元の API スキーマ
{
  "openapi": "3.1.0",
  "info": {
    "title": "GitHub Repository Reader",
    "description": "An OpenAPI specification for a GPT to read and understand GitHub repository content.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://api.github.com"
    }
  ],
  "paths": {
    "/repos/{owner}/{repo}/contents/": {
      "get": {
        "summary": "List all files and directories in a repository",
        "operationId": "listRepoContents",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "path": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/repos/{owner}/{repo}/contents/{path}": {
      "get": {
        "summary": "Get contents of a specific file or directory in a repository",
        "operationId": "getRepoFileContents",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {}
  }
}