---
title: github
full: true
---

import { Root, API, APIInfo, APIExample, Responses, Response, ResponseTypes, ExampleResponse, TypeScriptResponse, Property, ObjectCollapsible, Requests, Request } from "fumadocs-ui/components/api";

<Root>

<API>

<APIInfo method={"GET"} route={"/github.one"}>

## github-one

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Query Parameters

<Property name={"githubId"} type={"string"} required={true} deprecated={false}>

<span>Minimum length: `1`</span>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X GET "http://localhost:3000/api/github.one?githubId=string"
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/github.one?githubId=string", {
  method: "GET"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"GET"} route={"/github.getGithubRepositories"}>

## github-getGithubRepositories

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Query Parameters

<Property name={"githubId"} type={"string"} required={true} deprecated={false}>

<span>Minimum length: `1`</span>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X GET "http://localhost:3000/api/github.getGithubRepositories?githubId=string"
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/github.getGithubRepositories?githubId=string", {
  method: "GET"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"GET"} route={"/github.getGithubBranches"}>

## github-getGithubBranches

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Query Parameters

<Property name={"repo"} type={"string"} required={true} deprecated={false}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"owner"} type={"string"} required={true} deprecated={false}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"githubId"} type={"string"} required={false} deprecated={false}>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X GET "http://localhost:3000/api/github.getGithubBranches?repo=string&owner=string&githubId=string"
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/github.getGithubBranches?repo=string&owner=string&githubId=string", {
  method: "GET"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"GET"} route={"/github.githubProviders"}>

## github-githubProviders

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X GET "http://localhost:3000/api/github.githubProviders"
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/github.githubProviders", {
  method: "GET"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/github.testConnection"}>

## github-testConnection

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"githubId"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/github.testConnection" \
  -d '{
  "githubId": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/github.testConnection", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

<API>

<APIInfo method={"POST"} route={"/github.update"}>

## github-update

### Authorization

<Property name={"Authorization"} type={"Bearer <token>"} required={true}>

In: `header`

</Property>

### Request Body

<Property name={"githubId"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"githubAppName"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"githubAppId"} type={"number | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"githubClientId"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"githubClientSecret"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"githubInstallationId"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"githubPrivateKey"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"githubWebhookSecret"} type={"string | null"} required={false} deprecated={undefined}>

</Property>

<Property name={"gitProviderId"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

<Property name={"name"} type={"string"} required={true} deprecated={undefined}>

<span>Minimum length: `1`</span>

</Property>

| Status code | Description |
| ----------- | ----------- |
| `200` | Successful response |
| `default` | Error response |

</APIInfo>

<APIExample>

<Requests items={["cURL","JavaScript"]}>

<Request value={"cURL"}>

```bash
curl -X POST "http://localhost:3000/api/github.update" \
  -d '{
  "githubId": "string",
  "githubAppName": "string",
  "githubAppId": 0,
  "githubClientId": "string",
  "githubClientSecret": "string",
  "githubInstallationId": "string",
  "githubPrivateKey": "string",
  "githubWebhookSecret": "string",
  "gitProviderId": "string",
  "name": "string"
}'
```

</Request>

<Request value={"JavaScript"}>

```js
fetch("http://localhost:3000/api/github.update", {
  method: "POST"
});
```

</Request>

</Requests>

<Responses items={["default"]}>

<Response value={"default"}>

<ResponseTypes>

<ExampleResponse>

```json
{
  "message": "string",
  "code": "string",
  "issues": [
    {
      "message": "string"
    }
  ]
}
```

</ExampleResponse>

<TypeScriptResponse>

```ts
export interface Response {
  message: string;
  code: string;
  issues?: {
    message: string;
  }[];
}
```

</TypeScriptResponse>

</ResponseTypes>

</Response>

</Responses>

</APIExample>

</API>

</Root>