WebF Expert

WebF Expert · GPT Actions

GitHub Issue Reviewer API

This API allows ChatGPT to review an issue from a GitHub repository using an access token for authentication.

  • GET /repos/{owner}/{repo}/issues/{issue_number}Get a single issue from a repository.
  • GET /repos/{owner}/{repo}/contents/{path}Get the contents of a file or directory in a repository.
  • GET /repos/{owner}/{repo}/pulls/{pull_number}Get a single pull request from a repository, including diff URL.
Original API schema
{
  "openapi": "3.0.0",
  "info": {
    "title": "GitHub Issue Reviewer API",
    "description": "This API allows ChatGPT to review an issue from a GitHub repository using an access token for authentication.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.github.com",
      "description": "GitHub API server"
    }
  ],
  "paths": {
    "/repos/{owner}/{repo}/issues/{issue_number}": {
      "get": {
        "operationId": "getSingleIssue",
        "summary": "Get a single issue from a repository.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "description": "The owner of the repository.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "required": true,
            "description": "The name of the repository.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "issue_number",
            "in": "path",
            "required": true,
            "description": "The number of the issue.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Details of the repository issue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "title": {
                      "type": "string"
                    },
                    "body": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "labels": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "comments": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Issue not found"
          }
        }
      }
    },
    "/repos/{owner}/{repo}/contents/{path}": {
      "get": {
        "operationId": "getRepositoryContent",
        "summary": "Get the contents of a file or directory in a repository.",
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "description": "The owner of the repository.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "required": true,
            "description": "The name of the repository.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "required": true,
            "description": "The file path relative to the repository root.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Repository content data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "path": {
                      "type": "string"
                    },
                    "content": {
                      "type": "string"
                    },
                    "encoding": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Content not found"
          }
        }
      }
    },
    "/repos/{owner}/{repo}/pulls/{pull_number}": {
      "get": {
        "operationId": "getPullRequestDetails",
        "summary": "Get a single pull request from a repository, including diff URL.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "owner",
            "in": "path",
            "required": true,
            "description": "The owner of the repository.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "repo",
            "in": "path",
            "required": true,
            "description": "The name of the repository.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pull_number",
            "in": "path",
            "required": true,
            "description": "The number of the pull request.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Details of the pull request, including diff URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer"
                    },
                    "number": {
                      "type": "integer"
                    },
                    "state": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "body": {
                      "type": "string"
                    },
                    "diff_url": {
                      "type": "string"
                    },
                    "patch_url": {
                      "type": "string"
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    },
                    "user": {
                      "type": "object",
                      "properties": {
                        "login": {
                          "type": "string"
                        },
                        "id": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Pull request not found"
          }
        }
      }
    }
  }
}