GitHub
API actions for the GitHub integration.
GitHub
Manage GitHub issues and repositories with a personal access token.
Add labels to issue
Add one or more labels to an issue.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | The username or organization that owns the repository (the part before the '/' in 'owner/repo'). |
repo | string | Yes | The name of the repository (the part after the '/' in 'owner/repo'). |
issue_number | number | Yes | The issue number shown on GitHub (for example, 42 for issue #42). |
labels | array | Yes | One or more labels to add to the issue. |
Response
[
"bug",
"enhancement",
"help wanted"
]Close issue
Close an existing issue.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | The username or organization that owns the repository (the part before the '/' in 'owner/repo'). |
repo | string | Yes | The name of the repository (the part after the '/' in 'owner/repo'). |
issue_number | number | Yes | The number of the issue to close (for example, 42 for issue #42). |
Response
{
"id": 789,
"number": 42,
"state": "closed",
"title": "Bug in feature X"
}Comment on issue
Add a comment to an existing issue.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | The username or organization that owns the repository (the part before the '/' in 'owner/repo'). |
repo | string | Yes | The name of the repository (the part after the '/' in 'owner/repo'). |
issue_number | number | Yes | The issue number shown on GitHub (for example, 42 for issue #42). |
body | string | Yes | The text of the comment. |
Response
{
"body": "This is a comment.",
"id": 456,
"user": {
"login": "commenter"
}
}Create issue
Create a new issue in a repository.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | The username or organization that owns the repository (the part before the '/' in 'owner/repo'). |
repo | string | Yes | The name of the repository (the part after the '/' in 'owner/repo'). |
title | string | Yes | The title of the new issue. |
body | string | No | The main text of the issue. |
labels | array | No | Labels to add to the issue. |
assignees | array | No | GitHub usernames of the people to assign to the issue. |
Response
{
"html_url": "https://github.com/user/repo/issues/43",
"id": 123,
"number": 43,
"title": "New Feature Request"
}Get issue
Get details of a specific issue.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | The username or organization that owns the repository (the part before the '/' in 'owner/repo'). |
repo | string | Yes | The name of the repository (the part after the '/' in 'owner/repo'). |
issue_number | number | Yes | The issue number shown on GitHub (for example, 42 for issue #42). |
Response
{
"body": "Description of the bug.",
"html_url": "https://github.com/user/repo/issues/42",
"id": 789,
"number": 42,
"state": "open",
"title": "Bug in feature X"
}List issues
List issues for a specific repository.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | The username or organization that owns the repository (the part before the '/' in 'owner/repo'). |
repo | string | Yes | The name of the repository (the part after the '/' in 'owner/repo'). |
state | string | No | Which issues to include, based on whether they are open or closed. Defaults to open issues. |
labels | array | No | Show only issues that have all of these labels. |
per_page | number | No | How many issues to return (up to 100). |
Response
[
{
"html_url": "https://github.com/user/repo/issues/42",
"id": 789,
"number": 42,
"state": "open",
"title": "Bug in feature X"
}
]List repositories
List the GitHub repositories your connected account can access.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
visibility | string | No | Which repositories to include, based on who can see them. |
affiliation | string | No | Which repositories to include, based on your role. |
per_page | number | No | How many repositories to return (up to 100). |
Response
[
{
"full_name": "user/my-repo",
"html_url": "https://github.com/user/my-repo",
"id": 123456,
"name": "my-repo",
"private": false
}
]