Repo Noob Supreme

Repo Noob Supreme · Acciones GPT

Github

Github for assistant

  • POST /user/reposCreate Repository
  • GET /repos/{owner}/{repo}/contents/{path}Get File Contents
  • PUT /repos/{owner}/{repo}/contents/{path}Create or Modify File
  • DELETE /repos/{owner}/{repo}/contents/{path}Delete File
  • GET /repos/{owner}/{repo}/issuesList Issues
  • POST /repos/{owner}/{repo}/issuesCreate an Issue
  • GET /repos/{owner}/{repo}/issues/{issue_number}Get an Issue
  • PATCH /repos/{owner}/{repo}/issues/{issue_number}Update an Issue
Esquema original API
{
  "openapi": "3.1.0",
  "info": {
    "title": "Github",
    "description": "Github for assistant",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://api.github.com"
    }
  ],
  "paths": {
    "/user/repos": {
      "post": {
        "summary": "Create Repository",
        "operationId": "createRepository",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {"type": "string"},
                  "description": {"type": "string"},
                  "private": {"type": "boolean"},
                  "has_issues": {"type": "boolean"},
                  "has_projects": {"type": "boolean"},
                  "has_wiki": {"type": "boolean"}
                },
                "required": ["name"]
              }
            }
          }
        },
        "responses": {
          "201": {"description": "Repository successfully created"},
          "422": {"description": "Unprocessable Entity - invalid input"}
        }
      }
    },
    "/repos/{owner}/{repo}/contents/{path}": {
      "get": {
        "summary": "Get File Contents",
        "operationId": "getFileContents",
        "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": "File contents retrieved successfully"},
          "404": {"description": "File not found"}
        }
      },
      "put": {
        "summary": "Create or Modify File",
        "operationId": "createOrUpdateFile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {"type": "string"},
                  "content": {"type": "string"},
                  "sha": {"type": "string"}
                },
                "required": ["message", "content"]
              }
            }
          }
        },
        "responses": {
          "201": {"description": "File created successfully"},
          "200": {"description": "File updated successfully"},
          "422": {"description": "Unprocessable Entity - invalid input"},
          "404": {"description": "File not found"}
        }
      },
      "delete": {
        "summary": "Delete File",
        "operationId": "deleteFile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {"type": "string"},
                  "sha": {"type": "string"}
                },
                "required": ["message", "sha"]
              }
            }
          }
        },
        "responses": {
          "200": {"description": "File deleted successfully"},
          "404": {"description": "File not found"}
        }
      }
    },
    "/repos/{owner}/{repo}/issues": {
      "get": {
        "summary": "List Issues",
        "operationId": "listIssues",
        "parameters": [
          {"name": "owner", "in": "path", "required": true, "schema": {"type": "string"}},
          {"name": "repo", "in": "path", "required": true, "schema": {"type": "string"}}
        ],
        "responses": {
          "200": {"description": "Issues retrieved successfully"}
        }
      },
      "post": {
        "summary": "Create an Issue",
        "operationId": "createIssue",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {"type": "string"},
                  "body": {"type": "string"},
                  "assignee": {"type": "string"},
                  "milestone": {"type": "integer"},
                  "labels": {"type": "array", "items": {"type": "string"}}
                },
                "required": ["title"]
              }
            }
          }
        },
        "responses": {
          "201": {"description": "Issue created successfully"},
          "422": {"description": "Unprocessable Entity - invalid input"}
        }
      }
    },
    "/repos/{owner}/{repo}/issues/{issue_number}": {
      "get": {
        "summary": "Get an Issue",
        "operationId": "getIssue",
        "parameters": [
          {"name": "owner", "in": "path", "required": true, "schema": {"type": "string"}},
          {"name": "repo", "in": "path", "required": true, "schema": {"type": "string"}},
          {"name": "issue_number", "in": "path", "required": true, "schema": {"type": "integer"}}
        ],
        "responses": {
          "200": {"description": "Issue retrieved successfully"},
          "404": {"description": "Issue not found"}
        }
      },
      "patch": {
        "summary": "Update an Issue",
        "operationId": "updateIssue",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {"type": "string"},
                  "body": {"type": "string"},
                  "assignee": {"type": "string"},
                  "milestone": {"type": "integer"},
                  "labels": {"type": "array", "items": {"type": "string"}},
                  "state": {"type": "string"}
                },
                "required": ["title"]
              }
            }
          }
        },
        "responses": {
          "200": {"description": "Issue updated successfully"},
          "422": {"description": "Unprocessable Entity - invalid input"}
        }
      }
    }
  },
    "components": {
      "schemas": {
        "User": {
          "type": "object",
          "properties": {
            "login": {"type": "string"},
            "id": {"type": "integer"},
            "node_id": {"type": "string"},
            "avatar_url": {"type": "string"},
            "gravatar_id": {"type": "string"},
            "url": {"type": "string"},
            "html_url": {"type": "string"},
            "followers_url": {"type": "string"},
            "following_url": {"type": "string"},
            "gists_url": {"type": "string"},
            "starred_url": {"type": "string"},
            "subscriptions_url": {"type": "string"},
            "organizations_url": {"type": "string"},
            "repos_url": {"type": "string"},
            "events_url": {"type": "string"},
            "received_events_url": {"type": "string"},
            "type": {"type": "string"},
            "site_admin": {"type": "boolean"}
          }
        },
        "Repository": {
          "type": "object",
          "properties": {
            "id": {"type": "integer"},
            "node_id": {"type": "string"},
            "name": {"type": "string"},
            "full_name": {"type": "string"},
            "private": {"type": "boolean"},
            "owner": {"$ref": "#/components/schemas/User"},
            "html_url": {"type": "string"},
            "description": {"type": "string"},
            "fork": {"type": "boolean"},
            "url": {"type": "string"},
            "forks_url": {"type": "string"},
            "keys_url": {"type": "string"},
            "collaborators_url": {"type": "string"},
            "teams_url": {"type": "string"},
            "hooks_url": {"type": "string"},
            "issue_events_url": {"type": "string"},
            "events_url": {"type": "string"},
            "assignees_url": {"type": "string"},
            "branches_url": {"type": "string"},
            "tags_url": {"type": "string"},
            "blobs_url": {"type": "string"},
            "git_tags_url": {"type": "string"},
            "git_refs_url": {"type": "string"},
            "trees_url": {"type": "string"}
      },
      "Commit": {
        "type": "object",
        "properties": {
          "sha": {"type": "string"},
          "node_id": {"type": "string"},
          "commit": {
            "type": "object",
            "properties": {
              "author": {
                "type": "object",
                "properties": {
                  "name": {"type": "string"},
                  "email": {"type": "string"},
                  "date": {"type": "string"}
                }
              },
              "committer": {
                "type": "object",
                "properties": {
                  "name": {"type": "string"},
                  "email": {"type": "string"},
                  "date": {"type": "string"}
                }
              },
              "message": {"type": "string"},
              "tree": {"type": "string"},
              "url": {"type": "string"},
              "comment_count": {"type": "integer"},
              "verification": {
                "type": "object",
                "properties": {
                  "verified": {"type": "boolean"},
                  "reason": {"type": "string"},
                  "signature": {"type": "string"},
                  "payload": {"type": "string"}
                }
              }
            }
          },
          "url": {"type": "string"},
          "html_url": {"type": "string"},
          "comments_url": {"type": "string"},
          "author": {"$ref": "#/components/schemas/User"},
          "committer": {"$ref": "#/components/schemas/User"},
          "parents": {"type": "array", "items": {"type": "string"}}
        }
      },
      "Issue": {
        "type": "object",
        "properties": {
          "id": {"type": "integer"},
          "node_id": {"type": "string"},
          "url": {"type": "string"},
          "repository_url": {"type": "string"},
          "labels_url": {"type": "string"},
          "comments_url": {"type": "string"},
          "events_url": {"type": "string"},
          "html_url": {"type": "string"},
          "number": {"type": "integer"},
          "state": {"type": "string"},
          "title": {"type": "string"},
          "body": {"type": "string"},
          "user": {"$ref": "#/components/schemas/User"},
          "labels": {"type": "array", "items": {"type": "string"}},
          "assignee": {"$ref": "#/components/schemas/User"},
          "milestone": {"type": "integer"},
          "locked": {"type": "boolean"},
          "active_lock_reason": {"type": "string"},
          "comments": {"type": "integer"},
          "pull_request": {
            "type": "object",
            "properties": {
              "url": {"type": "string"},
              "html_url": {"type": "string"},
              "diff_url": {"type": "string"},
              "patch_url": {"type": "string"}
            }
          },
          "closed_at": {"type": "string"},
          "created_at": {"type": "string"},
          "updated_at": {"type": "string"},
          "closed_by": {"$ref": "#/components/schemas/User"}
        }
      },
      "File": {
        "type": "object",
        "properties": {
          "name": {"type": "string"},
          "path": {"type": "string"},
          "sha": {"type": "string"},
          "size": {"type": "integer"},
          "url": {"type": "string"},
          "html_url": {"type": "string"},
          "git_url": {"type": "string"},
          "download_url": {"type": "string"},
          "type": {"type": "string"},
          "_links": {
            "type": "object",
            "properties": {
              "self": {"type": "string"},
              "git": {"type": "string"},
              "html": {"type": "string"}
            }
          }
        }
      },
      "Directory": {
        "type": "object",
        "properties": {
          "name": {"type": "string"},
          "path": {"type": "string"},
          "sha": {"type": "string"},
          "url": {"type": "string"},
          "html_url": {"type": "string"},
          "git_url": {"type": "string"},
          "download_url": {"type": "string"},
          "type": {"type": "string"},
          "_links": {
            "type": "object",
            "properties": {
              "self": {"type": "string"},
              "git": {"type": "string"},
              "html": {"type": "string"}
            }
          }
        }
      }
    }
  }
  }
}