# GitHub

Source: https://opvs.ai/docs/api/github

## `POST` /api/v1/github/link

**Create Repo Link**

Link a board to a GitHub repo. Creates a webhook for events.

**Request body**

```bash
curl -X POST 'https://app.opvs.ai/api/v1/github/link' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "board_id": "string",
  "repo_owner": "string",
  "repo_name": "string",
  "integration_id": 0,
  "sync_issues": true,
  "sync_pull_requests": true,
  "default_labels": []
}'
```

```python
import httpx

resp = httpx.post(
    "https://app.opvs.ai/api/v1/github/link",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"board_id": "string", "repo_owner": "string", "repo_name": "string", "integration_id": 0, "sync_issues": true, "sync_pull_requests": true, "default_labels": []},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/github/link", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"board_id": "string", "repo_owner": "string", "repo_name": "string", "integration_id": 0, "sync_issues": true, "sync_pull_requests": true, "default_labels": []})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"board_id": "string", "repo_owner": "string", "repo_name": "string", "integration_id": 0, "sync_issues": true, "sync_pull_requests": true, "default_labels": []}`)
	req, _ := http.NewRequest("POST", "https://app.opvs.ai/api/v1/github/link", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `GET` /api/v1/github/link/{board_id}

**Get Repo Link**

Get the GitHub repo link for a board.

**Parameters**

- `board_id` (path, string, required)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/github/link/{board_id}' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/github/link/{board_id}",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/github/link/{board_id}", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/github/link/{board_id}", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `DELETE` /api/v1/github/link/{board_id}

**Delete Repo Link**

Unlink a board from its GitHub repo. Deletes the webhook.

**Parameters**

- `board_id` (path, string, required)

```bash
curl -X DELETE 'https://app.opvs.ai/api/v1/github/link/{board_id}' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.delete(
    "https://app.opvs.ai/api/v1/github/link/{board_id}",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/github/link/{board_id}", {
  method: "DELETE",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://app.opvs.ai/api/v1/github/link/{board_id}", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `GET` /api/v1/github/sync/{board_id}

**Get Sync Status**

Get all task ↔ GitHub issue sync entries for a board.

**Parameters**

- `board_id` (path, string, required)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/github/sync/{board_id}' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/github/sync/{board_id}",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/github/sync/{board_id}", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/github/sync/{board_id}", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `POST` /api/v1/github/sync/{board_id}/poll-ci

**Poll Board Ci**

Reconcile CI status from the GitHub Checks API onto branch-linked rows.

**Parameters**

- `board_id` (path, string, required)

```bash
curl -X POST 'https://app.opvs.ai/api/v1/github/sync/{board_id}/poll-ci' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.post(
    "https://app.opvs.ai/api/v1/github/sync/{board_id}/poll-ci",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/github/sync/{board_id}/poll-ci", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://app.opvs.ai/api/v1/github/sync/{board_id}/poll-ci", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `GET` /api/v1/github/live/{board_id}

**Get Live Pr Lens**

Live PR + CI state for every card on this board that carries a ``pr_number``.

**Parameters**

- `board_id` (path, string, required)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/github/live/{board_id}' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/github/live/{board_id}",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/github/live/{board_id}", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/github/live/{board_id}", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `GET` /api/v1/github/repos/{integration_id}

**List Repos**

List GitHub repos accessible via the given integration.

**Parameters**

- `integration_id` (path, integer, required)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/github/repos/{integration_id}' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/github/repos/{integration_id}",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/github/repos/{integration_id}", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/github/repos/{integration_id}", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `GET` /api/v1/github/issues/{board_id}

**List Board Issues**

List GitHub issues for the repo linked to this board.

**Parameters**

- `board_id` (path, string, required)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/github/issues/{board_id}' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/github/issues/{board_id}",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/github/issues/{board_id}", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/github/issues/{board_id}", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## Create Repo Link

`POST https://app.opvs.ai/api/v1/github/link`

Also as: MCP `tool_call software-factory.githubLinkBoard` · skill `software-factory`

Link a board to a GitHub repo. Creates a webhook for events.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Get Repo Link

`GET https://app.opvs.ai/api/v1/github/link/{board_id}`

Also as: MCP `tool_call software-factory.githubGetBoardLink` · skill `software-factory`

Get the GitHub repo link for a board.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Delete Repo Link

`DELETE https://app.opvs.ai/api/v1/github/link/{board_id}`

Also as: MCP `tool_call software-factory.githubUnlinkBoard` · skill `software-factory`

Unlink a board from its GitHub repo. Deletes the webhook.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Get Sync Status

`GET https://app.opvs.ai/api/v1/github/sync/{board_id}`

Also as: MCP `tool_call software-factory.githubSyncStatus` · skill `software-factory`

Get all task ↔ GitHub issue sync entries for a board.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Poll Board Ci

`POST https://app.opvs.ai/api/v1/github/sync/{board_id}/poll-ci`

Also as: MCP `tool_call software-factory.githubPollBoardCi` · skill `software-factory`

Reconcile CI status from the GitHub Checks API onto branch-linked rows.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Get Live Pr Lens

`GET https://app.opvs.ai/api/v1/github/live/{board_id}`

Also as: MCP `tool_call software-factory.githubLivePrs` · skill `software-factory`

Live PR + CI state for every card on this board that carries a ``pr_number``.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## List Repos

`GET https://app.opvs.ai/api/v1/github/repos/{integration_id}`

Also as: MCP `tool_call software-factory.githubListRepos` · skill `software-factory`

List GitHub repos accessible via the given integration.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## List Board Issues

`GET https://app.opvs.ai/api/v1/github/issues/{board_id}`

Also as: MCP `tool_call software-factory.githubListBoardIssues` · skill `software-factory`

List GitHub issues for the repo linked to this board.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |
