productivity
GitLab Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the GitLab KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.gitlab.*.
Use lua_read_doc("integrations.gitlab") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
GitLab workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.gitlab.create_issue({project_id = "example_project_id", title = "example_title", description = "example_description", labels = "example_labels", assignee_ids = "example_assignee_ids", milestone_id = 1, weight = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("gitlab"))' --json
kosmo integrations:lua --eval 'print(docs.read("gitlab.create_issue"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local gitlab = app.integrations.gitlab
local result = gitlab.create_issue({project_id = "example_project_id", title = "example_title", description = "example_description", labels = "example_labels", assignee_ids = "example_assignee_ids", milestone_id = 1, weight = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.gitlab, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.gitlab.default.* or app.integrations.gitlab.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need GitLab, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
HTTP client for the GitLab REST API (v4) — Lua API Reference
gitlab_accept_merge_request
Accept (merge) a GitLab merge request. Optionally set a custom merge commit message..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
mr_iid | integer | yes | The project-scoped merge request IID to accept. |
merge_commit_message | string | no | Custom merge commit message. |
Example
local result = app.integrations.gitlab.gitlab_accept_merge_request({
project_id = ""
mr_iid = 0
merge_commit_message = ""
})
gitlab_create_branch
Create a new branch in a GitLab project repository. Requires a branch name and a ref (branch name or commit SHA) to create from..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
branch | string | yes | The name of the new branch. Example: |
ref | string | yes | The branch name or commit SHA to create from. Example: |
Example
local result = app.integrations.gitlab.gitlab_create_branch({
project_id = ""
branch = ""
ref = ""
})
gitlab_create_issue
Create a new issue in a GitLab project. Requires a project ID and title. Optionally set description, labels, assignees, milestone, and weight..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project (e.g. |
title | string | yes | The title of the issue. |
description | string | no | The description of the issue. Supports GitLab Markdown. |
labels | string | no | Comma-separated label names to apply. Example: |
assignee_ids | array | no | |
milestone_id | integer | no | The milestone ID to associate with the issue. |
weight | integer | no | The weight of the issue (0-9). |
Example
local result = app.integrations.gitlab.gitlab_create_issue({
project_id = ""
title = ""
description = ""
})
gitlab_create_issue_comment
Add a comment (note) to a GitLab issue. The comment body supports GitLab Markdown..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
issue_iid | integer | yes | The project-scoped issue IID. |
body | string | yes | The comment body. Supports GitLab Markdown. |
Example
local result = app.integrations.gitlab.gitlab_create_issue_comment({
project_id = ""
issue_iid = 0
body = ""
})
gitlab_create_merge_request
Create a new merge request in a GitLab project. Requires source branch, target branch, and title..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
source_branch | string | yes | The source branch name (where changes come from). |
target_branch | string | yes | The target branch name (where changes merge into). |
title | string | yes | The title of the merge request. |
description | string | no | The description of the merge request. Supports GitLab Markdown. |
labels | string | no | Comma-separated label names. Example: |
Example
local result = app.integrations.gitlab.gitlab_create_merge_request({
project_id = ""
source_branch = ""
target_branch = ""
})
gitlab_get_file
Get a file from a GitLab project repository. Returns file content (base64-encoded), file name, size, and encoding..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
file_path | string | yes | The path of the file in the repository. Example: |
ref | string | yes | The name of the branch, tag, or commit SHA. |
Example
local result = app.integrations.gitlab.gitlab_get_file({
project_id = ""
file_path = ""
ref = ""
})
gitlab_get_issue
Get detailed information about a specific GitLab issue, including title, description, labels, assignees, milestone, and state..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
issue_iid | integer | yes | The project-scoped issue IID (not the global ID). |
Example
local result = app.integrations.gitlab.gitlab_get_issue({
project_id = ""
issue_iid = 0
})
gitlab_get_merge_request
Get detailed information about a specific GitLab merge request, including title, description, source/target branches, and state..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
mr_iid | integer | yes | The project-scoped merge request IID (not the global ID). |
Example
local result = app.integrations.gitlab.gitlab_get_merge_request({
project_id = ""
mr_iid = 0
})
gitlab_get_project
Get details for a specific GitLab project, including name, description, default branch, visibility, and statistics..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project (e.g. |
Example
local result = app.integrations.gitlab.gitlab_get_project({
project_id = ""
})
gitlab_list_branches
List branches in a GitLab project repository. Supports searching by branch name and pagination..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
search | string | no | Search term to filter branches by name. |
page | integer | no | Page number for pagination. Default: 1. |
Example
local result = app.integrations.gitlab.gitlab_list_branches({
project_id = ""
search = ""
page = 0
})
gitlab_list_commits
List commits in a GitLab project repository. Supports filtering by branch or tag name. Paginated..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
ref_name | string | no | The name of the branch or tag to filter commits by. |
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
Example
local result = app.integrations.gitlab.gitlab_list_commits({
project_id = ""
ref_name = ""
page = 0
})
gitlab_list_groups
List GitLab groups visible to the authenticated user. Paginated..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
Example
local result = app.integrations.gitlab.gitlab_list_groups({
page = 0
per_page = 0
})
gitlab_list_issues
List issues in a GitLab project. Supports filtering by state (opened, closed, all), labels, and search text. Paginated..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
state | string | no | Issue state filter: opened, closed, all. Default: opened. |
labels | string | no | Comma-separated label names to filter by. Example: |
search | string | no | Search text to filter issues by title or description. |
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
Example
local result = app.integrations.gitlab.gitlab_list_issues({
project_id = ""
state = ""
labels = ""
})
gitlab_list_labels
List all labels for a GitLab project, including name, color, description, and open/closed issue counts..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
Example
local result = app.integrations.gitlab.gitlab_list_labels({
project_id = ""
})
gitlab_list_merge_requests
List merge requests in a GitLab project. Supports filtering by state (opened, closed, merged, all). Paginated..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
state | string | no | Merge request state filter: opened, closed, merged, all. Default: opened. |
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
Example
local result = app.integrations.gitlab.gitlab_list_merge_requests({
project_id = ""
state = ""
page = 0
})
gitlab_list_project_members
List members of a GitLab project and their access levels. Paginated..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
page | integer | no | Page number for pagination. Default: 1. |
Example
local result = app.integrations.gitlab.gitlab_list_project_members({
project_id = ""
page = 0
})
gitlab_list_projects
List GitLab projects visible to the authenticated user. Supports filtering by membership, search text, and pagination..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
membership | boolean | no | Limit to projects where the user is a member. Default: false. |
search | string | no | Search term to filter projects by name or path. |
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
Example
local result = app.integrations.gitlab.gitlab_list_projects({
membership = true
search = ""
page = 0
})
gitlab_search_issues
Search for issues in a GitLab project by keyword. Searches issue titles and descriptions. Optionally filter by state..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
search | string | yes | Search text to find in issue titles and descriptions. |
state | string | no | Issue state filter: opened, closed, all. Default: opened. |
Example
local result = app.integrations.gitlab.gitlab_search_issues({
project_id = ""
search = ""
state = ""
})
gitlab_update_issue
Update an existing issue in a GitLab project. Can change title, description, labels, state (close/reopen), and assignees..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
issue_iid | integer | yes | The project-scoped issue IID to update. |
title | string | no | New title for the issue. |
description | string | no | New description for the issue. Supports GitLab Markdown. |
labels | string | no | Comma-separated label names. Replaces existing labels. Example: |
state_event | string | no | State transition action: |
assignee_ids | array | no | Array of user IDs to assign. Replaces existing assignees. |
Example
local result = app.integrations.gitlab.gitlab_update_issue({
project_id = ""
issue_iid = 0
title = ""
})
gitlab_update_merge_request
Update an existing merge request in a GitLab project. Can change title, description, labels, and state (close/reopen)..
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
mr_iid | integer | yes | The project-scoped merge request IID to update. |
title | string | no | New title for the merge request. |
description | string | no | New description for the merge request. Supports GitLab Markdown. |
state_event | string | no | State transition action: |
labels | string | no | Comma-separated label names. Replaces existing labels. |
Example
local result = app.integrations.gitlab.gitlab_update_merge_request({
project_id = ""
mr_iid = 0
title = ""
})
Multi-Account Usage
If you have multiple gitlab accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.gitlab.function_name({...})
-- Explicit default (portable across setups)
app.integrations.gitlab.default.function_name({...})
-- Named accounts
app.integrations.gitlab.work.function_name({...})
app.integrations.gitlab.personal.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# HTTP client for the GitLab REST API (v4) — Lua API Reference
## gitlab_accept_merge_request
Accept (merge) a GitLab merge request. Optionally set a custom merge commit message..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `mr_iid` | integer | yes | The project-scoped merge request IID to accept. |
| `merge_commit_message` | string | no | Custom merge commit message. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_accept_merge_request({
project_id = ""
mr_iid = 0
merge_commit_message = ""
})
```
## gitlab_create_branch
Create a new branch in a GitLab project repository. Requires a branch name and a ref (branch name or commit SHA) to create from..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `branch` | string | yes | The name of the new branch. Example: |
| `ref` | string | yes | The branch name or commit SHA to create from. Example: |
### Example
```lua
local result = app.integrations.gitlab.gitlab_create_branch({
project_id = ""
branch = ""
ref = ""
})
```
## gitlab_create_issue
Create a new issue in a GitLab project. Requires a project ID and title. Optionally set description, labels, assignees, milestone, and weight..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project (e.g. |
| `title` | string | yes | The title of the issue. |
| `description` | string | no | The description of the issue. Supports GitLab Markdown. |
| `labels` | string | no | Comma-separated label names to apply. Example: |
| `assignee_ids` | array | no | |
| `milestone_id` | integer | no | The milestone ID to associate with the issue. |
| `weight` | integer | no | The weight of the issue (0-9). |
### Example
```lua
local result = app.integrations.gitlab.gitlab_create_issue({
project_id = ""
title = ""
description = ""
})
```
## gitlab_create_issue_comment
Add a comment (note) to a GitLab issue. The comment body supports GitLab Markdown..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `issue_iid` | integer | yes | The project-scoped issue IID. |
| `body` | string | yes | The comment body. Supports GitLab Markdown. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_create_issue_comment({
project_id = ""
issue_iid = 0
body = ""
})
```
## gitlab_create_merge_request
Create a new merge request in a GitLab project. Requires source branch, target branch, and title..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `source_branch` | string | yes | The source branch name (where changes come from). |
| `target_branch` | string | yes | The target branch name (where changes merge into). |
| `title` | string | yes | The title of the merge request. |
| `description` | string | no | The description of the merge request. Supports GitLab Markdown. |
| `labels` | string | no | Comma-separated label names. Example: |
### Example
```lua
local result = app.integrations.gitlab.gitlab_create_merge_request({
project_id = ""
source_branch = ""
target_branch = ""
})
```
## gitlab_get_file
Get a file from a GitLab project repository. Returns file content (base64-encoded), file name, size, and encoding..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `file_path` | string | yes | The path of the file in the repository. Example: |
| `ref` | string | yes | The name of the branch, tag, or commit SHA. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_get_file({
project_id = ""
file_path = ""
ref = ""
})
```
## gitlab_get_issue
Get detailed information about a specific GitLab issue, including title, description, labels, assignees, milestone, and state..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `issue_iid` | integer | yes | The project-scoped issue IID (not the global ID). |
### Example
```lua
local result = app.integrations.gitlab.gitlab_get_issue({
project_id = ""
issue_iid = 0
})
```
## gitlab_get_merge_request
Get detailed information about a specific GitLab merge request, including title, description, source/target branches, and state..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `mr_iid` | integer | yes | The project-scoped merge request IID (not the global ID). |
### Example
```lua
local result = app.integrations.gitlab.gitlab_get_merge_request({
project_id = ""
mr_iid = 0
})
```
## gitlab_get_project
Get details for a specific GitLab project, including name, description, default branch, visibility, and statistics..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project (e.g. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_get_project({
project_id = ""
})
```
## gitlab_list_branches
List branches in a GitLab project repository. Supports searching by branch name and pagination..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `search` | string | no | Search term to filter branches by name. |
| `page` | integer | no | Page number for pagination. Default: 1. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_list_branches({
project_id = ""
search = ""
page = 0
})
```
## gitlab_list_commits
List commits in a GitLab project repository. Supports filtering by branch or tag name. Paginated..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `ref_name` | string | no | The name of the branch or tag to filter commits by. |
| `page` | integer | no | Page number for pagination. Default: 1. |
| `per_page` | integer | no | Results per page (1-100). Default: 20. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_list_commits({
project_id = ""
ref_name = ""
page = 0
})
```
## gitlab_list_groups
List GitLab groups visible to the authenticated user. Paginated..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination. Default: 1. |
| `per_page` | integer | no | Results per page (1-100). Default: 20. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_list_groups({
page = 0
per_page = 0
})
```
## gitlab_list_issues
List issues in a GitLab project. Supports filtering by state (opened, closed, all), labels, and search text. Paginated..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `state` | string | no | Issue state filter: opened, closed, all. Default: opened. |
| `labels` | string | no | Comma-separated label names to filter by. Example: |
| `search` | string | no | Search text to filter issues by title or description. |
| `page` | integer | no | Page number for pagination. Default: 1. |
| `per_page` | integer | no | Results per page (1-100). Default: 20. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_list_issues({
project_id = ""
state = ""
labels = ""
})
```
## gitlab_list_labels
List all labels for a GitLab project, including name, color, description, and open/closed issue counts..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_list_labels({
project_id = ""
})
```
## gitlab_list_merge_requests
List merge requests in a GitLab project. Supports filtering by state (opened, closed, merged, all). Paginated..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `state` | string | no | Merge request state filter: opened, closed, merged, all. Default: opened. |
| `page` | integer | no | Page number for pagination. Default: 1. |
| `per_page` | integer | no | Results per page (1-100). Default: 20. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_list_merge_requests({
project_id = ""
state = ""
page = 0
})
```
## gitlab_list_project_members
List members of a GitLab project and their access levels. Paginated..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `page` | integer | no | Page number for pagination. Default: 1. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_list_project_members({
project_id = ""
page = 0
})
```
## gitlab_list_projects
List GitLab projects visible to the authenticated user. Supports filtering by membership, search text, and pagination..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `membership` | boolean | no | Limit to projects where the user is a member. Default: false. |
| `search` | string | no | Search term to filter projects by name or path. |
| `page` | integer | no | Page number for pagination. Default: 1. |
| `per_page` | integer | no | Results per page (1-100). Default: 20. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_list_projects({
membership = true
search = ""
page = 0
})
```
## gitlab_search_issues
Search for issues in a GitLab project by keyword. Searches issue titles and descriptions. Optionally filter by state..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `search` | string | yes | Search text to find in issue titles and descriptions. |
| `state` | string | no | Issue state filter: opened, closed, all. Default: opened. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_search_issues({
project_id = ""
search = ""
state = ""
})
```
## gitlab_update_issue
Update an existing issue in a GitLab project. Can change title, description, labels, state (close/reopen), and assignees..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `issue_iid` | integer | yes | The project-scoped issue IID to update. |
| `title` | string | no | New title for the issue. |
| `description` | string | no | New description for the issue. Supports GitLab Markdown. |
| `labels` | string | no | Comma-separated label names. Replaces existing labels. Example: |
| `state_event` | string | no | State transition action: |
| `assignee_ids` | array | no | Array of user IDs to assign. Replaces existing assignees. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_update_issue({
project_id = ""
issue_iid = 0
title = ""
})
```
## gitlab_update_merge_request
Update an existing merge request in a GitLab project. Can change title, description, labels, and state (close/reopen)..
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `project_id` | string | yes | The ID or URL-encoded path of the project. |
| `mr_iid` | integer | yes | The project-scoped merge request IID to update. |
| `title` | string | no | New title for the merge request. |
| `description` | string | no | New description for the merge request. Supports GitLab Markdown. |
| `state_event` | string | no | State transition action: |
| `labels` | string | no | Comma-separated label names. Replaces existing labels. |
### Example
```lua
local result = app.integrations.gitlab.gitlab_update_merge_request({
project_id = ""
mr_iid = 0
title = ""
})
```
---
## Multi-Account Usage
If you have multiple gitlab accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.gitlab.function_name({...})
-- Explicit default (portable across setups)
app.integrations.gitlab.default.function_name({...})
-- Named accounts
app.integrations.gitlab.work.function_name({...})
app.integrations.gitlab.personal.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.gitlab.create_issue({project_id = "example_project_id", title = "example_title", description = "example_description", labels = "example_labels", assignee_ids = "example_assignee_ids", milestone_id = 1, weight = 1})
print(result) Functions
create_issue Write
Create a new issue in a GitLab project. Requires a project ID and title. Optionally set description, labels, assignees, milestone, and weight.
- Lua path
app.integrations.gitlab.create_issue- Full name
gitlab.gitlab_create_issue
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project (e.g. "123" or "group%2Fproject"). |
title | string | yes | The title of the issue. |
description | string | no | The description of the issue. Supports GitLab Markdown. |
labels | string | no | Comma-separated label names to apply. Example: "bug,urgent". |
assignee_ids | array | no | Array of user IDs to assign. Example: [1, 2]. |
milestone_id | integer | no | The milestone ID to associate with the issue. |
weight | integer | no | The weight of the issue (0-9). |
get_issue Read
Get detailed information about a specific GitLab issue, including title, description, labels, assignees, milestone, and state.
- Lua path
app.integrations.gitlab.get_issue- Full name
gitlab.gitlab_get_issue
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
issue_iid | integer | yes | The project-scoped issue IID (not the global ID). |
update_issue Write
Update an existing issue in a GitLab project. Can change title, description, labels, state (close/reopen), and assignees.
- Lua path
app.integrations.gitlab.update_issue- Full name
gitlab.gitlab_update_issue
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
issue_iid | integer | yes | The project-scoped issue IID to update. |
title | string | no | New title for the issue. |
description | string | no | New description for the issue. Supports GitLab Markdown. |
labels | string | no | Comma-separated label names. Replaces existing labels. Example: "bug,urgent". |
state_event | string | no | State transition action: "close" to close, "reopen" to reopen. |
assignee_ids | array | no | Array of user IDs to assign. Replaces existing assignees. |
list_issues Read
List issues in a GitLab project. Supports filtering by state (opened, closed, all), labels, and search text. Paginated.
- Lua path
app.integrations.gitlab.list_issues- Full name
gitlab.gitlab_list_issues
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
state | string | no | Issue state filter: opened, closed, all. Default: opened. |
labels | string | no | Comma-separated label names to filter by. Example: "bug,urgent". |
search | string | no | Search text to filter issues by title or description. |
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
search_issues Read
Search for issues in a GitLab project by keyword. Searches issue titles and descriptions. Optionally filter by state.
- Lua path
app.integrations.gitlab.search_issues- Full name
gitlab.gitlab_search_issues
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
search | string | yes | Search text to find in issue titles and descriptions. |
state | string | no | Issue state filter: opened, closed, all. Default: opened. |
create_issue_comment Write
Add a comment (note) to a GitLab issue. The comment body supports GitLab Markdown.
- Lua path
app.integrations.gitlab.create_issue_comment- Full name
gitlab.gitlab_create_issue_comment
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
issue_iid | integer | yes | The project-scoped issue IID. |
body | string | yes | The comment body. Supports GitLab Markdown. |
create_merge_request Write
Create a new merge request in a GitLab project. Requires source branch, target branch, and title.
- Lua path
app.integrations.gitlab.create_merge_request- Full name
gitlab.gitlab_create_merge_request
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
source_branch | string | yes | The source branch name (where changes come from). |
target_branch | string | yes | The target branch name (where changes merge into). |
title | string | yes | The title of the merge request. |
description | string | no | The description of the merge request. Supports GitLab Markdown. |
labels | string | no | Comma-separated label names. Example: "feature,review". |
get_merge_request Read
Get detailed information about a specific GitLab merge request, including title, description, source/target branches, and state.
- Lua path
app.integrations.gitlab.get_merge_request- Full name
gitlab.gitlab_get_merge_request
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
mr_iid | integer | yes | The project-scoped merge request IID (not the global ID). |
list_merge_requests Read
List merge requests in a GitLab project. Supports filtering by state (opened, closed, merged, all). Paginated.
- Lua path
app.integrations.gitlab.list_merge_requests- Full name
gitlab.gitlab_list_merge_requests
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
state | string | no | Merge request state filter: opened, closed, merged, all. Default: opened. |
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
update_merge_request Write
Update an existing merge request in a GitLab project. Can change title, description, labels, and state (close/reopen).
- Lua path
app.integrations.gitlab.update_merge_request- Full name
gitlab.gitlab_update_merge_request
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
mr_iid | integer | yes | The project-scoped merge request IID to update. |
title | string | no | New title for the merge request. |
description | string | no | New description for the merge request. Supports GitLab Markdown. |
state_event | string | no | State transition action: "close" to close, "reopen" to reopen. |
labels | string | no | Comma-separated label names. Replaces existing labels. |
accept_merge_request Write
Accept (merge) a GitLab merge request. Optionally set a custom merge commit message.
- Lua path
app.integrations.gitlab.accept_merge_request- Full name
gitlab.gitlab_accept_merge_request
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
mr_iid | integer | yes | The project-scoped merge request IID to accept. |
merge_commit_message | string | no | Custom merge commit message. |
list_branches Read
List branches in a GitLab project repository. Supports searching by branch name and pagination.
- Lua path
app.integrations.gitlab.list_branches- Full name
gitlab.gitlab_list_branches
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
search | string | no | Search term to filter branches by name. |
page | integer | no | Page number for pagination. Default: 1. |
create_branch Write
Create a new branch in a GitLab project repository. Requires a branch name and a ref (branch name or commit SHA) to create from.
- Lua path
app.integrations.gitlab.create_branch- Full name
gitlab.gitlab_create_branch
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
branch | string | yes | The name of the new branch. Example: "my-feature". |
ref | string | yes | The branch name or commit SHA to create from. Example: "main". |
list_commits Read
List commits in a GitLab project repository. Supports filtering by branch or tag name. Paginated.
- Lua path
app.integrations.gitlab.list_commits- Full name
gitlab.gitlab_list_commits
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
ref_name | string | no | The name of the branch or tag to filter commits by. |
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
get_file Read
Get a file from a GitLab project repository. Returns file content (base64-encoded), file name, size, and encoding.
- Lua path
app.integrations.gitlab.get_file- Full name
gitlab.gitlab_get_file
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
file_path | string | yes | The path of the file in the repository. Example: "README.md". |
ref | string | yes | The name of the branch, tag, or commit SHA. |
list_projects Read
List GitLab projects visible to the authenticated user. Supports filtering by membership, search text, and pagination.
- Lua path
app.integrations.gitlab.list_projects- Full name
gitlab.gitlab_list_projects
| Parameter | Type | Required | Description |
|---|---|---|---|
membership | boolean | no | Limit to projects where the user is a member. Default: false. |
search | string | no | Search term to filter projects by name or path. |
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
get_project Read
Get details for a specific GitLab project, including name, description, default branch, visibility, and statistics.
- Lua path
app.integrations.gitlab.get_project- Full name
gitlab.gitlab_get_project
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project (e.g. "123" or "group%2Fproject"). |
list_groups Read
List GitLab groups visible to the authenticated user. Paginated.
- Lua path
app.integrations.gitlab.list_groups- Full name
gitlab.gitlab_list_groups
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination. Default: 1. |
per_page | integer | no | Results per page (1-100). Default: 20. |
list_project_members Read
List members of a GitLab project and their access levels. Paginated.
- Lua path
app.integrations.gitlab.list_project_members- Full name
gitlab.gitlab_list_project_members
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |
page | integer | no | Page number for pagination. Default: 1. |
list_labels Read
List all labels for a GitLab project, including name, color, description, and open/closed issue counts.
- Lua path
app.integrations.gitlab.list_labels- Full name
gitlab.gitlab_list_labels
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | yes | The ID or URL-encoded path of the project. |