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_id | number | Yes | GitLab project ID |
issue_iid | number | Yes | Issue internal ID (IID) to close |
Response
{
"id": 456,
"iid": 1,
"state": "closed"
}Comment on issue
Add a comment (note) to a GitLab issue.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | number | Yes | GitLab project ID |
issue_iid | number | Yes | Issue internal ID (IID) |
body | string | Yes | Comment body |
Response
{
"body": "This is a comment.",
"id": 101
}Create issue
Create a new issue in a GitLab project.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | number | Yes | GitLab project ID |
title | string | Yes | Issue title |
description | string | No | Issue description |
labels | array | No | Labels to assign 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_id | number | Yes | GitLab project ID |
state | string | No | Filter by state (opened, closed, all) |
labels | array | No | Filter by labels |
per_page | number | No | Number of results per page (max 100) |
Response
[
{
"id": 456,
"iid": 1,
"state": "opened",
"title": "Bug report",
"web_url": "https://gitlab.com/user/project/-/issues/1"
}
]List projects
List GitLab projects accessible to the authenticated user.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
membership | boolean | No | Filter by membership (true to only show projects user is a member of) |
search | string | No | Search query to filter projects by name |
per_page | number | No | Number of results per page (max 100) |
Response
[
{
"id": 123,
"name": "my-project",
"path_with_namespace": "user/my-project",
"visibility": "private",
"web_url": "https://gitlab.com/user/my-project"
}
]