GitLab
API actions for the GitLab integration.
GitLab
Manage GitLab projects and issues with a personal access token.
Close issue
Close an existing GitLab issue.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | string | Yes | The project the issue belongs to. Enter the project path shown in its web address (for example, 'my-group/my-project') or its numeric project ID. |
issue_iid | number | Yes | The number of the issue to close (for example, 5 for issue #5). |
Response
{
"id": 456,
"iid": 1,
"state": "closed"
}Comment on issue
Add a comment to a GitLab issue.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | string | Yes | The project the issue belongs to. Enter the project path shown in its web address (for example, 'my-group/my-project') or its numeric project ID. |
issue_iid | number | Yes | The issue number shown in GitLab (for example, 5 for issue #5). |
body | string | Yes | The text of the comment. |
Response
{
"body": "This is a comment.",
"id": 101
}Create issue
Create a new issue in a GitLab project.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | string | Yes | The project to create the issue in. Enter the project path shown in its web address (for example, 'my-group/my-project') or its numeric project ID. |
title | string | Yes | The title of the new issue. |
description | string | No | The main text of the issue. |
labels | array | No | Labels to add to the issue. |
Response
{
"id": 789,
"iid": 2,
"title": "New feature request",
"web_url": "https://gitlab.com/user/project/-/issues/2"
}List issues
List issues for a specific GitLab project.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | string | Yes | The project to list issues from. Enter the project path shown in its web address (for example, 'my-group/my-project') or its numeric project ID. |
state | string | No | Show issues that are open, closed, or both. 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
[
{
"id": 456,
"iid": 1,
"state": "opened",
"title": "Bug report",
"web_url": "https://gitlab.com/user/project/-/issues/1"
}
]List projects
List the GitLab projects your account can access.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
membership | boolean | No | Set to true to only show projects you are a member of. |
search | string | No | Show only projects whose name contains this text. |
per_page | number | No | How many projects to return (up to 100). |
Response
[
{
"id": 123,
"name": "my-project",
"path_with_namespace": "user/my-project",
"visibility": "private",
"web_url": "https://gitlab.com/user/my-project"
}
]