1. Overview
Gitlab is a complete DevOps platform delivered as a single application, fundamentally changing how development, security, and operations teams collaborate. It provides a comprehensive suite of integrated tools for code hosting, version control, continuous integration/continuous deployment (CI/CD), project management, and more.
Through GoInsight's Gitlab node, you can seamlessly integrate code repository and project management operations into your automated workflows. This enables you to build powerful automation processes around code, issues, and release cycles, including:
- Issue Management: Automatically create, edit, get, and lock Issues in projects.
- Release Management: Automate software releases, including creating, updating, deleting, and getting Releases.
- Comment Interaction: Automatically create comments under specified issues for notifications or logging.
- Repository Information Queries: Get detailed information about a single repository or all repositories for a user, and list files in repositories.
2. Prerequisites
Before using this node, you need to have a valid Gitlab account. Depending on whether you are using gitlab.com or a self-hosted instance, access methods may differ. You also need to generate a Personal Access Token with appropriate permissions (usually the api scope) as credentials.
3. Credentials
For detailed guidance on how to obtain and configure credentials, please refer to our official documentation: Credentials Configuration Guide.
4. Supported Operations
This node primarily operates on resources such as Repositories, Issues, Releases, Commits, and Files within GitLab.
Summary
| Resource | Operation | Description |
|---|---|---|
| Repository | Get a Repository | Retrieves detailed information about a specific repository (project) from GitLab. |
| Repository | Get a User Repositories | Securely retrieves the authenticated user's repositories (projects) from GitLab. |
| Issue | Create an Issue | Creates a new issue in a GitLab repository. |
| Issue | Get an Issue | Retrieves detailed information about a specific issue from a GitLab repository. |
| Issue | Edit an Issue | Edits an existing issue in a GitLab repository. |
| Issue | Get Issues of a Repository | Retrieves a list of issues from a GitLab repository. |
| Issue | Lock an Issue | Locks or unlocks discussion on an issue in a GitLab repository. |
| Issue Comment | Create a Comment on an Issue | Adds a comment to an issue in a GitLab repository. |
| Release | Create a Release | Creates a new release in a GitLab repository. |
| Release | Get a Release | Retrieves detailed information about a specific release from a GitLab repository. |
| Release | Get Many Releases | Retrieves a paginated list of releases from a GitLab repository. |
| Release | Update a Release | Updates an existing release in a GitLab repository. |
| Release | Delete a Release | Deletes a release from a GitLab repository. |
| Commit | List Commits | Retrieves a list of commits from a GitLab repository with advanced filtering. |
| Commit | Get Commit Diff | Retrieves the file changes (diff) of a specific commit from a GitLab repository. |
| Commit Comment | Get Commit Comments | Retrieves all comments on a specific commit from a GitLab repository. |
| Commit Comment | Post Comment to Commit | Adds a comment to a specific commit in a GitLab repository. |
| File | List Files | Lists files and subdirectories in a specified directory of a GitLab repository. |
| File | Get Raw File from Repository | Retrieves the raw content of a file from a GitLab repository without Base64 encoding. |
Operation Details
Get a Repository
Retrieves detailed information about a specific repository (project) from GitLab. Returns the complete project object including name, description, URL, visibility, default branch, statistics (stars, forks, issues), permissions, namespace, and more. Ideal for project information queries, permission verification, and automated configuration.
Input Parameters:
- RepositoryId: The unique identifier of the repository. Supports 3 formats: 1) Numeric ID (e.g., '123456'), 2) Path format (e.g., 'my-group/my-project'), 3) Full path with multiple groups (e.g., 'group/subgroup/project'). How to obtain: Method 1: Extract from GitLab web URL (e.g., https://gitlab.com/group/project → use 'group/project'). Method 2: Call 'List User Projects' or 'Search Projects' workflow to get 'id' or 'path_with_namespace' from results. Method 3: View 'Project ID: 12345' at the top of GitLab project settings page. Special characters: Paths with spaces or special characters will be automatically URL-encoded (e.g., 'my project' → 'my%20project'). Numeric ID is recommended to avoid path encoding issues. Examples: '123456', 'gitlab-org/gitlab', 'backend/services/api-gateway'
Options:
- GitlabUrl: The base URL of the GitLab instance. Examples: https://gitlab.com (official cloud service), https://gitlab.company.com (company self-hosted), http://localhost:8080 (local development environment). Default: https://gitlab.com
- TokenAuthType: Token authentication method. Selection guide: 'Bearer' (recommended): For GitLab 12.0+ versions, supports OAuth2 Token and Personal Access Token (PAT). This is the standard method for modern APIs. 'PRIVATE-TOKEN': For GitLab versions below 12.0, or self-hosted instances without OAuth2 enabled. How to choose: 1) If using gitlab.com (cloud service), choose Bearer. 2) If self-hosted GitLab version >= 12, choose Bearer. 3) If self-hosted GitLab version < 12, choose PRIVATE-TOKEN. 4) If Bearer returns 401 with error 'Invalid Authorization header', try PRIVATE-TOKEN. Default: Bearer
Output:
- Repository (object): GitLab repository object. Contains the following core fields:
Basic Information
- id (number): Repository unique numeric ID
- name (string): Repository name (short name)
- path (string): Repository path (short path)
- path_with_namespace (string): Full path with group name (e.g., 'group/subgroup/project')
- web_url (string): Repository web URL
- description (string): Repository description (may be empty)
Status Information
- visibility (string): Visibility ('public', 'internal', 'private')
- default_branch (string): Default branch name (usually 'main' or 'master')
- archived (boolean): Whether archived
Timestamps
- created_at (string): Creation time in ISO 8601 format
- last_activity_at (string): Last activity time
Owner Information
- owner (object): Repository owner object containing id, name, username, avatar_url
Statistics
- star_count (number): Star count
- forks_count (number): Fork count
- open_issues_count (number): Open issue count
Note: Full schema contains 50+ fields. Above are the most commonly used fields. For other fields (e.g., ci_config_path, namespace, permissions), please refer to GitLab API documentation.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get a User Repositories
Securely retrieves the authenticated user's repositories (projects) from GitLab. Supports visibility filtering, sorting, searching, and pagination. Returns an array of projects the user owns or has access to. Ideal for personal project management, permission audits, batch operations, and repository statistics. Compatible with GitLab.com and self-hosted instances.
Options:
- GitlabUrl: The base URL of the GitLab instance. Supports: (1) Official SaaS: https://gitlab.com (default, no modification needed); (2) Self-hosted: https://gitlab.company.com (contact IT for correct URL); (3) Local: http://localhost:8080 (for local development). Must be accessible from your network.
- TokenAuthType: Token authentication method for GitLab API. Use 'Bearer' for GitLab 12+ and official SaaS (https://gitlab.com). Use 'PRIVATE-TOKEN' for older self-hosted deployments. If unsure, try 'Bearer' first; if it fails with 401, try 'PRIVATE-TOKEN'. Contact your GitLab admin for the correct method.
- IncludeOwnedOnly: Filter repositories by ownership. If true, only retrieve repositories you own (owned=true). If false, retrieve all accessible projects including owned, contributed, and member of. Recommended: true for personal use, false for team/group collaboration.
- SearchKeyword: Optional search keyword to filter repositories by name or description. Uses GitLab native search API (not local filtering), supports partial matching across all accessible repositories. Searches in: project name, project path, project description. Case-insensitive. Examples: 'backend' matches 'Backend-API', 'My-Backend', 'backend-service'. Leave empty to retrieve all repositories. Note: Search results respect pagination settings.
- Page: Page number of results to retrieve. GitLab returns 20 items per page by default. Use with PerPage to navigate through all repositories. Example: Page=1 returns items 1-20, Page=2 returns items 21-40. Default: 1.
- PerPage: Number of items per page (1-100). Default: 20. Max: 100. Tip: Use 100 for bulk data retrieval; use 20 for UI display.
- OrderBy: Sort repositories by field. Options: id (repository ID), name (alphabetical), path (project path), created_at (creation time), updated_at (last modified), last_activity_at (recent activity, includes commits/issues/MRs). Default: last_activity_at. Most used: last_activity_at (find active projects), created_at (newest projects).
- Sort: Sort order. asc = ascending (A-Z, oldest first), desc = descending (Z-A, newest first). Default: desc.
Output:
- Repositories (object-array): Array of full repository objects returned by GitLab API. Each object contains all fields from GitLab Projects API including: id (numeric repository ID), name (project name), name_with_namespace (full path with group), path (project path), path_with_namespace (full path for API calls), description (project description), visibility (public/private/internal), created_at (ISO 8601 timestamp), last_activity_at (ISO 8601 timestamp of last activity), web_url (GitLab web interface URL), ssh_url_to_repo (SSH clone URL), http_url_to_repo (HTTPS clone URL), readme_url (README file URL), default_branch (main branch name), star_count (number of stars), forks_count (number of forks), open_issues_count (number of open issues), archived (boolean indicating if archived), empty_repo (boolean indicating if empty), creator_id (user ID of creator), namespace (object containing group/user info), and other metadata fields. Refer to GitLab Projects API documentation for complete field list: https://docs.gitlab.com/ee/api/projects.html#list-all-projects
- Pagination (object): Pagination metadata object containing: page (current page number), per_page (items per page), total_count (total number of repositories across all pages), total_pages (total number of pages), next_page (next page number, null if on last page), has_more (boolean indicating if more pages exist). Example: {"page": 1, "per_page": 20, "total_count": 127, "total_pages": 7, "next_page": 2, "has_more": true}
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create an Issue
Creates a new issue in a GitLab repository. Supports setting title, description (Markdown format), labels, assignees, milestones, due dates, priorities, and more. Ideal for bug reporting, feature requests, task tracking, and project management. Supports confidential issues and discussion locking.
Input Parameters:
- RepositoryId: The repository identifier. How to obtain: 1) Extract from repository URL: https://gitlab.com/group/project -> 'group/project', 2) Check numeric ID from repository settings page (Settings > General), 3) Query via 'List Projects' or 'Search Projects' workflow. Supports formats: 1) Numeric ID (e.g., '123456'), 2) Path with groups (e.g., 'group/project' or 'group/subgroup/project'), 3) Auto URL-encoding for special characters. Examples: '123', 'my-group/my-project'. Contact GitLab admin if 404 occurs.
- Title: The title of the issue. Required. Examples: 'Fix login bug', 'Feature: Add dark mode', 'Documentation needed'. Supports up to 255 characters.
Options:
- GitlabUrl: The GitLab instance access URL. Common scenarios: 1) Official cloud service: https://gitlab.com (keep default), 2) Company private deployment: https://gitlab.company.com (contact admin), 3) Local development: http://localhost:8080. Note: General users using official GitLab do not need to modify this parameter.
- Description: The description of the issue. Optional. Supports Markdown formatting. Examples: 'Bold text, italic, code, links'. Use for detailed information about the issue.
- Labels: Comma-separated labels for the issue. Optional. Examples: 'bug,urgent,frontend'. Note: 1) If labels do not exist, GitLab will auto-create them, 2) Creating new labels requires Maintainer or higher permission, otherwise will fail, 3) Recommend using existing project labels to avoid label sprawl.
- AssigneeIds: User IDs to assign the issue to. Optional. How to obtain user IDs: 1) Check user profile URL: https://gitlab.com/username -> User settings -> Account, 2) Use 'Search Users' or 'List Users' workflow, 3) API: GET /users?username=xxx. Supports multiple assignees (comma-separated or array). Examples: '123', '123,456'. Note: GitLab CE only supports single assignee, Premium/Ultimate support multiple assignees.
- DueDate: Issue due date. Optional. Format: YYYY-MM-DD (ISO 8601 date format). Examples: '2026-02-15', '2026-12-31'. The due date helps track issue deadlines and appears in issue lists and calendars. Leave empty if no due date is needed.
- TokenAuthType: Authentication method (general users do not need to modify, keep default): 1) 'Bearer' (recommended): For GitLab 12+ versions, uses OAuth2 or Personal Access Token (PAT), 2) 'PRIVATE-TOKEN': For legacy GitLab or internal deployments. Advanced option: If unsure, use default value 'Bearer'.
- AdditionalFields: Additional GitLab API fields for advanced configuration (JSON object). Supported fields: 1) confidential (boolean): Mark as confidential issue, 2) epic_id (integer): Epic ID to link (Premium/Ultimate only), 3) health_status (string): Health status (on_track/needs_attention/at_risk, Ultimate only), 4) issue_type (string): Type (issue/incident/test_case/task), 5) milestone_id (integer): Milestone ID, 6) weight (integer): Issue weight (Premium/Ultimate only), 7) state_event (string): State action (reopen/close), 8) discussion_locked (boolean): Lock discussions, 9) created_at (string): Custom creation time (ISO 8601 format, admin only). Example (JSON object): {"milestone_id": 5, "confidential": true, "issue_type": "task", "weight": 3}
Output:
- Issue (object): Complete issue object from GitLab API. Core fields: id (integer): Issue unique numeric ID, iid (integer): Issue number within project, project_id (integer): Belonging project ID, title (string): Issue title, description (string): Issue description (Markdown format), state (string): Status, values: opened/closed, labels (array): Label array, author (object): Creator information, contains id/name/username, assignees (array): Assigned user list, created_at (string): Creation time, ISO 8601 format, updated_at (string): Update time, ISO 8601 format, web_url (string): Issue web access URL. For complete fields please refer to GitLab API documentation.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 401=Unauthorized (invalid/expired token), 403=Forbidden (no permission), 404=Not Found (repository doesn't exist), 422=Unprocessable Entity (invalid data or label permission), 429=Rate Limited (retry after specified seconds), 500=System error (may retry), 503=Service Unavailable (may retry), 504=Gateway Timeout (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get an Issue
Retrieves detailed information about a specific issue from a GitLab repository. Returns the complete issue object including title, description, state, author, assignees, labels, milestones, timestamps, comment count, and more. Ideal for task detail viewing, status tracking, and data analysis.
Input Parameters:
- RepositoryId: Repository identifier. Supports:
1) Numeric ID: '123456'
2) Path: 'group/project' or 'group/subgroup/project'
3) Full URL (auto-parsed): 'https://gitlab.com/group/project'
Do NOT manually URL-encode - the system handles encoding automatically. Special characters are auto URL-encoded. Contact GitLab admin if 404 occurs.
- IssueIid: The internal ID (iid) of the issue within the repository. This is the issue number shown in GitLab UI (e.g., '#42').
How to get:
- From GitLab issue page URL: .../issues/42
- From 'Search Issues' or 'List Repository Issues' workflow outputs
- Note: Use iid (project-scoped), not id (global unique)
Examples: '42', '100', '1'.
Options:
- GitlabUrl: The base URL of the GitLab instance. Examples: https://gitlab.com (official SaaS), https://gitlab.company.com (self-hosted), http://localhost:8080 (local development). Default: https://gitlab.com
- TokenAuthType: How GitLab validates your token:
- Bearer (Recommended): Modern method, works with OAuth2 and Personal Access Tokens. Use this unless admin tells you otherwise.
- PRIVATE-TOKEN: Legacy method for self-hosted GitLab < 12.0 or specific internal deployments.
Default: Bearer (safe choice for most users)
Output:
- Issue (object): Complete issue object from GitLab API.
Core fields:
- id (number): Global unique ID
- iid (number): Project-scoped issue number (shown in GitLab UI as #42)
- project_id (number): Parent project ID
- title (string): Issue title
- description (string): Issue description (Markdown format)
- state (string): Issue state - opened | closed | reopened
- labels (array): Label names attached to issue
- author (object): Creator information {id, username, name, avatar_url}
- assignees (array): Assigned users list
- assignee (object): Primary assignee (deprecated, use assignees)
- milestone (object): Associated milestone {id, title, due_date}
- created_at (string): Creation timestamp (ISO 8601 format)
- updated_at (string): Last update timestamp (ISO 8601 format)
- closed_at (string): Close timestamp (null if not closed)
- web_url (string): Browser link to issue page
- user_notes_count (number): Number of comments
- upvotes (number): Upvote count
- downvotes (number): Downvote count
- due_date (string): Due date (YYYY-MM-DD format, null if not set)
- confidential (boolean): Whether issue is confidential
- weight (number): Issue weight (null if not set)
- time_stats (object): Time tracking statistics {time_estimate, total_time_spent}
Additional fields: The object may contain more fields depending on GitLab version and project settings. Allows flexible downstream processing.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Edit an Issue
Edits an existing issue in a GitLab repository. Allows modification of title, description, state (open/closed), labels, assignees, milestones, and more. Supports partial updates (only specified fields are modified). Ideal for task status updates, information refinement, and assignee adjustments in project management.
Input Parameters:
- RepositoryId: The repository identifier. Can be obtained via List Projects or Get a Project actions. Supports: 1) Numeric ID (e.g., '123456'), 2) Path with groups (e.g., 'group/project' or 'group/subgroup/project'), 3) Auto URL-encoding for special characters. Examples: '123', 'my-group/my-project'. Contact GitLab admin if 404 occurs.
- IssueIid: The internal ID (iid) of the issue to edit. This is the issue number shown in the GitLab UI (e.g., '#42' means iid='42'). Can be obtained via List Issues or Get an Issue actions. Examples: '42', '100', '1'.
Options:
- GitlabUrl: The base URL of the GitLab instance. Examples: https://gitlab.com (official SaaS), https://gitlab.company.com (self-hosted), http://localhost:8080 (local development). Default: https://gitlab.com
- Title: The new title of the issue. Optional. Leave empty to keep the current title. Max length typically 255 characters.
- Description: The new description of the issue. Optional. Supports Markdown formatting: bold, italic, code, links, lists, code blocks, etc. Leave empty to keep the current description. Max length depends on GitLab configuration.
- State: The new state of the issue. Optional. Valid values: 'opened' (reopens a previously closed issue for further work) or 'closed' (marks the issue as resolved or no longer actionable). IMPORTANT: This parameter is internally converted to 'state_event' API field ('reopen' or 'close'). Leave empty to keep current state.
- Labels: Comma-separated list of labels to assign to the issue. Optional. Replaces all existing labels. Examples: 'bug,urgent', 'feature,documentation'. Leave empty to keep current labels. Use API to retrieve available labels for your project.
- TokenAuthType: Authentication method: 'Bearer' (recommended for GitLab 12+ and OAuth2/PAT scenarios) or 'PRIVATE-TOKEN' (legacy method for internal deployments or older GitLab versions). Default: Bearer. When to use: Use 'Bearer' for modern GitLab SaaS; use 'PRIVATE-TOKEN' if your admin requires it.
- AdditionalFields: Additional issue fields as a JSON object. Supported fields: assignee_ids (array of user IDs), confidential (boolean), due_date (YYYY-MM-DD), epic_id (number), health_status (string), issue_type (string), milestone_id (number), weight (number), discussion_locked (boolean). Optional.
Output:
- Issue (object): Complete updated issue object from GitLab API. Core Fields: id (issue ID), iid (issue number shown in UI), title, description, state (opened/closed), web_url (issue URL). User Info: author (object with id/username/name), assignees (array of user objects). Organization: labels (array of strings), milestone (object with id/title). Timestamps: created_at, updated_at, closed_at. Advanced: epic (object), weight (number), health_status (string), discussion_locked (boolean). Allows flexible downstream processing.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Issues of a Repository
Retrieves a list of issues from a GitLab repository. Supports multiple filtering options (state, labels, assignees, milestones, author, etc.), keyword search, sorting, and pagination. Returns an array of issue summaries. Ideal for task boards, project management, data statistics, and batch processing.
Input Parameters:
- RepositoryId: Repository identifier. Supports two formats:
1) Numeric ID (recommended): e.g., '123456'. How to get: Call 'List Projects' or 'Search Projects' workflow.
2) Full path: Format 'group/project' or 'group/subgroup/project'. Examples: 'my-team/backend-api', 'company/platform/auth-service'. The '/' in path will be auto URL-encoded.
Warning: Path is case-sensitive ('MyTeam' != 'myteam'). Special characters (like spaces) will be auto-encoded. If 404 returned, check path correctness or contact admin to verify permissions.
Options:
- GitlabUrl: GitLab server address. Default: https://gitlab.com (official cloud service). For company self-hosted server: https://gitlab.company.com (contact IT department). For local development: http://localhost:8080. Note: No trailing slash needed.
- TokenAuthType: Token type (authentication method). Recommended: 'Bearer' (suitable for most scenarios, including Personal Access Token and OAuth2). Other: 'PRIVATE-TOKEN' (only for old version GitLab or internal deployment). Regular users should use default 'Bearer'.
- State: Filter issue state. Leave empty to return all states (including opened, closed, reopened).
Available values:
- 'opened': Unclosed issues (pending)
- 'closed': Closed issues (resolved or abandoned)
- '' (empty, default): All states
Note: GitLab API also supports 'reopened' state (reopened after closed). Leave empty to query all states.
- SearchKeyword: Full-text search keyword. Search scope: issue's title and description (does not include comments).
Matching rules:
- Case-insensitive
- Partial matching ('login' can match 'User Login Issue')
- Does NOT support boolean operators (AND/OR)
- Does NOT support wildcards (* or ?)
Leave empty to return all issues (subject to State and other filter conditions).
Examples:
- 'login' -> Search issues containing 'login'
- 'performance bug' -> Search issues containing 'performance bug' (space treated as whole)
- PerPage: Number of issues returned per page. Range: 1-100. Default: 20. GitLab supports max 100 items/page. Suggestion: Use 20 for small projects, 100 for large projects.
- Page: Page number (starts from 1). Used for pagination to get more issues. Use with PerPage. Example: Page=2, PerPage=50 returns issues 51-100.
Output:
- Issues (object-array): Complete array of issue objects from GitLab API. Each issue contains:
- id (number): Global unique identifier
- iid (number): Repository-level issue number (Issue #123)
- project_id (number): Project ID
- title (string): Issue title
- description (string): Detailed description (Markdown format)
- state (string): State (opened/closed/reopened)
- labels (array): Label list
- author (object): Creator info (id, name, username)
- assignees (array): Assignee list
- milestone (object): Milestone
- created_at (string): Creation time (ISO 8601)
- updated_at (string): Update time (ISO 8601)
- closed_at (string): Close time (ISO 8601, null if not closed)
- web_url (string): Browser access link
- references (object): Reference info
- time_stats (object): Time tracking stats
- task_completion_status (object): Task completion status
Empty array if no issues found.
- Pagination (object): Pagination metadata containing:
- Page (number): Current page number
- PerPage (number): Items per page
- TotalCount (number): Total number of issues
- TotalPages (number): Total number of pages
- HasMore (boolean): Whether there are more pages to fetch
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Lock an Issue
Locks or unlocks discussion on an issue in a GitLab repository. When locked, only project members can add comments, preventing external users from continuing the discussion. Ideal for resolved issues, avoiding unproductive arguments, and managing sensitive topics. Supports toggling lock state.
Input Parameters:
- RepositoryId: The repository identifier. How to get: 1) Go to your GitLab project page, 2) Click Settings > General, 3) Find 'Project ID' or use the URL path.
Supported formats:
- Numeric ID: '123456'
- Path with groups: 'my-group/my-project' or 'group/subgroup/project'
- Auto URL-encoding for special characters
Special characters: Spaces and special characters in project names are automatically URL-encoded (e.g., 'My Project' becomes 'My%20Project'). Just use the original project path.
Troubleshooting: If you get a 404 error:
- Verify the project exists in GitLab
- Check if you have access permissions
- Try using the numeric Project ID instead of path
- IssueIid: The internal ID (iid) of the issue to lock/unlock. This is the issue number shown in the GitLab UI (e.g., '#42').
How to get:
- From GitLab UI: Issue number in the title (e.g., '#42')
- From API: Use 'Search Issues' or 'Get Issue' action to retrieve the iid field
- From workflow: Connect this to the output of a previous GitLab issue action
- Lock: Controls the discussion_locked attribute in GitLab. Set to true to lock issue discussions (prevent comments from non-maintainers), false to unlock discussions (allow all team members to comment).
Set to true (Lock):
- Prevents all comments except from project maintainers (administrators)
- Use when: Issue is resolved and you want to prevent further discussion, or discussions are getting off-topic
Set to false (Unlock):
- Allows all team members to comment
- Use when: Issue is active and needs team collaboration
Note: Maintainers can always comment regardless of lock status.
Options:
- GitlabUrl: Most users can leave this as default (https://gitlab.com).
The web address of your GitLab service.
When to change:
- Using company-managed GitLab: Ask your IT admin for the URL (e.g., https://gitlab.company.com)
- Using local development: Use http://localhost:8080 or your custom port
- Using regional GitLab: Contact admin for the correct URL
Examples:
- Official GitLab: https://gitlab.com (default)
- Company GitLab: https://gitlab.company.com
- Local: http://localhost:8080
- TokenAuthType: Authentication method for GitLab API.
Options:
- 'Bearer' (Default, Recommended): Modern authentication method. Works with GitLab 12+ and supports both Personal Access Tokens and OAuth2. Use this unless your admin tells you otherwise.
- 'PRIVATE-TOKEN': Legacy method for older GitLab versions or internal deployments.
Most users should leave this as default ('Bearer').
Output:
- Issue (object): Complete updated issue object from GitLab API.
Core Fields:
- id (number): GitLab internal ID
- iid (number): Project-scoped issue number (e.g., #42)
- title (string): Issue title
- description (string): Issue body/description
- state (string): Issue state (opened/closed)
- discussion_locked (boolean): Whether discussions are locked (the value updated by this action)
- author (object): Author info with id, username, name, avatar_url
- assignees (array): List of assigned users
- labels (array): Issue labels
- milestone (object): Associated milestone
- created_at (string): ISO 8601 timestamp
- updated_at (string): ISO 8601 timestamp
- closed_at (string): ISO 8601 timestamp (null if not closed)
- web_url (string): GitLab UI URL
- project_id (number): Parent project ID
- user_notes_count (number): Number of comments
- upvotes (number): Number of upvotes
- downvotes (number): Number of downvotes
- due_date (string): Due date (null if not set)
- confidential (boolean): Whether the issue is confidential
- weight (number): Issue weight (null if not set)
- time_stats (object): Time tracking statistics
Full schema reference: https://docs.gitlab.com/ee/api/issues.html#single-issue
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Comment on an Issue
Adds a comment to an issue in a GitLab repository. Supports Markdown format for discussions, feedback, progress tracking, and @mentioning team members. Comments are displayed chronologically and can be edited or deleted later. Ideal for task communication, issue discussions, and progress updates in collaborative workflows.
Input Parameters:
- RepositoryId: The repository identifier. Supports: 1) Numeric ID (e.g., '123456'), 2) Path with groups (e.g., 'group/project' or 'group/subgroup/project'), 3) Auto URL-encoding for special characters. Examples: '123', 'my-group/my-project'. Contact GitLab admin if 404 occurs.
- IssueIid: The internal ID (iid) of the issue within the repository. This is the issue number shown in the GitLab UI (e.g., '#42'). How to obtain: 1) Via API: Call 'Search Issues' or 'List Repository Issues' workflow, 2) Via UI: Check the issue detail page URL (e.g., https://gitlab.com/group/project/issues/42, where 42 is the IssueIid). Examples: '42', '100', '1'.
- CommentBody: The content of the comment. Required. Supports Markdown formatting: bold, italic, code, links, lists, code blocks, etc. Max length: 10,000 characters (GitLab instance may have different configuration).
Options:
- GitlabUrl: The base URL of the GitLab instance. Examples: https://gitlab.com (official SaaS), https://gitlab.company.com (self-hosted), http://localhost:8080 (local development). Default: https://gitlab.com
- TokenAuthType: Authentication method. Options: 'Bearer' (recommended for GitLab 12+, OAuth2 or PAT) or 'PRIVATE-TOKEN' (legacy, for internal deployments). Default: Bearer
Output:
- Comment (object): GitLab comment object. Core fields:
- id (number): Comment ID
- note (string): Comment body text (Markdown rendered)
- author (object): Author information containing id, name, username, avatar_url, web_url
- created_at (string): Creation time in ISO 8601 format (e.g., '2024-01-15T10:30:00Z')
- updated_at (string): Last update time in ISO 8601 format
- noteable_id (number): ID of the issue this comment belongs to
- noteable_type (string): Type of the noteable (always 'Issue')
- noteable_iid (number): Internal ID (iid) of the issue
- system (boolean): Whether this is a system-generated comment
- resolvable (boolean): Whether this comment can be resolved
- resolved (boolean): Whether this comment has been resolved
- can_edit (boolean): Whether current user can edit this comment
- can_award_emoji (boolean): Whether emojis can be awarded to this comment
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), 400=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create a Release
Creates a new release in a GitLab repository. Supports automatic Git tag creation, release notes in Markdown format, milestone association, and asset file uploads. Ideal for software version publishing, changelog management, and release automation. Compatible with both GitLab.com and self-hosted instances.
Input Parameters:
- RepositoryId: The ID or URL-encoded path of the repository. Supports two formats: (1) Numeric project ID (e.g., '12345'), or (2) Full path with namespace (e.g., 'group/subgroup/project'). You can obtain this value from the project's Settings page or by calling the 'List Projects' or 'Search Projects' action.
- TagName: The Git tag name for this release. Must follow Git tag naming conventions. If the tag does not exist yet, it will be created automatically based on the 'Ref' parameter.
Options:
- GitlabUrl: The base URL of the GitLab instance. Default is https://gitlab.com for GitLab.com. If you are using self-hosted GitLab or GitLab regional instances (e.g., EU), provide the custom URL here.
- ReleaseName: The human-readable name of the release. If not provided, the tag name will be used as the release name. This is displayed prominently in the GitLab UI.
- Description: The release notes or description. Supports Markdown format. Use this to document changes, features, and bug fixes in this release.
- Ref: ⚠️ IMPORTANT: The commit SHA, branch name, or another tag to create the release tag from. If the tag specified in 'TagName' does not exist, it will be created pointing to this ref.
Default value: 'main' (assumes your main branch is named 'main')
⚠️ WARNING: If your repository's default branch is named 'master' or something else, you MUST change this parameter, otherwise the tag creation will fail.
When to use:
- If the tag already exists, this parameter is ignored
- If the tag does not exist, it will be created from this ref
- Recommend checking tag existence first using 'List Tags' action
- TokenAuthType: Authentication method for GitLab API. Usually no need to modify.
Options:
- 'Bearer' (Default, Recommended): Works with GitLab.com and modern self-hosted GitLab (version 12+). Compatible with OAuth2 tokens and Personal Access Tokens (PAT).
- 'PRIVATE-TOKEN' (Legacy): Only needed for very old GitLab versions (pre-12) or special internal deployments.
💡 TIP: If unsure, keep the default value 'Bearer'.
- AdditionalFields: Additional GitLab API fields for advanced configuration (JSON object). Supported fields:
1) milestones (array of strings): Milestone titles to associate with the release. Example: ["v1.0", "MVP"]
2) released_at (string): Custom release date/time in ISO 8601 format. If not provided, uses current time. Example: "2024-03-15T10:00:00Z"
3) direct_asset_path (string): Path to a package file for direct download link. Example: "/packages/generic/my-package/1.0.0/package.zip"
4) assets_links (array of objects): Asset links to attach to the release. Each item should have 'name' and 'url' fields. Common use cases: binary downloads, documentation links, Docker images. Example: [{"name": "Windows Installer", "url": "https://example.com/app.exe"}, {"name": "Documentation", "url": "https://docs.example.com"}]
Output:
- Release (object): Complete release object returned by GitLab API. Empty object ({}) if creation failed. Contains all release metadata including: tag_name (the Git tag), name (release name), description (release notes in Markdown), created_at (ISO 8601 timestamp), released_at (custom release time if set), author (user object with id, name, username, avatar_url), commit (commit object with id, short_id, title, message, author_name, committed_date), upcoming_release (boolean), assets (object with count, sources array, links array), evidences (array of evidence objects), _links (API URLs for self, edit_url, issue_url, merge_requests_url). This allows flexible downstream processing of all release information without field extraction limitations.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), 500=System error (network timeout or connection failure, may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded. When StatusCode is 200 and ErrorMessage is empty: Operation fully succeeded, release created. When StatusCode is 200 and ErrorMessage is not empty: Parameter validation failed or GitLab API returned a business error (e.g., tag already exists, invalid ref, insufficient permissions). When StatusCode is 500: Network-level error (timeout, connection refused, DNS failure).
Get a Release
Retrieves detailed information about a specific release from a GitLab repository. Returns the complete release object including tag name, release notes, author info, associated commit, asset links, milestones, and more. Ideal for viewing version details, downloading release assets, and accessing changelog information.
Input Parameters:
- RepositoryId: The ID or URL-encoded path of the repository. Supports two formats: (1) Numeric project ID (e.g., '12345'), or (2) Full path with namespace (e.g., 'group/subgroup/project'). You can obtain this value from the project's Settings page or by calling the 'List Projects' or 'Search Projects' action. Example: 'mygroup/myproject'
- TagName: The Git tag name of the release to retrieve. Must match exactly with an existing release tag. Use 'List Releases' action to discover available release tags. Example: 'v1.0.0'
Options:
- GitlabUrl: The base URL of the GitLab instance. Default is https://gitlab.com for GitLab.com. If you are using self-hosted GitLab or GitLab regional instances (e.g., EU), provide the custom URL here. Example: 'https://gitlab.example.com'
- TokenAuthType: Authentication method: 'Bearer' (recommended for GitLab 12+, OAuth2 or PAT) or 'PRIVATE-TOKEN' (legacy, for internal deployments). Default: Bearer
Output:
- Release (object): Complete release object from GitLab API.
Core Fields:
- tag_name (string): Git tag (e.g., 'v1.0.0')
- name (string): Release title
- description (string): Release notes in Markdown format
- author (object): Creator information
- id (number): User ID
- name (string): Display name
- username (string): GitLab username
- avatar_url (string): Profile picture URL
- created_at (string): Creation timestamp (ISO 8601 format)
- released_at (string): Release publication timestamp
- commit (object): Associated commit details
- id (string): Full commit SHA
- short_id (string): Short commit SHA
- title (string): Commit message title
- created_at (string): Commit timestamp
- author_name (string): Commit author
- author_email (string): Author email
- assets (object): Release assets and downloads
- links (array): External asset URLs (custom download links)
- id (number): Link ID
- name (string): Link display name
- url (string): Download URL
- link_type (string): Link type (e.g., 'other', 'package')
- sources (array): Auto-generated source code archives
- format (string): Archive format ('zip', 'tar.gz', 'tar.bz2', 'tar')
- url (string): Download URL
- milestones (array): Linked milestone objects
- id (number): Milestone ID
- title (string): Milestone title
- description (string): Milestone description
- state (string): Milestone state ('active', 'closed')
- created_at (string): Creation timestamp
- updated_at (string): Last update timestamp
- due_date (string): Due date (nullable)
- evidences (array): Release evidence records (for audit trails)
- sha (string): Evidence SHA256 hash
- filepath (string): Evidence file path
- collected_at (string): Evidence collection timestamp
- _links (object): API navigation URLs
- self (string): Current release API URL
- edit_url (string): GitLab UI edit page URL
Usage Examples:
- Access tag: Release.tag_name
- Get author name: Release.author.name
- Download first asset: Release.assets.links[0].url
- Check commit SHA: Release.commit.short_id
- List milestones: Release.milestones[0].title
Empty Object {} Scenarios:
- Release not found (check ErrorMessage for '404' details)
- Insufficient permissions (check ErrorMessage for '403' details)
- Network failure (check StatusCode and OriginalStatusCode)
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Releases
Retrieves a paginated list of releases from a GitLab repository. Supports sorting by release date and pagination. Returns summary information for each release including tag, title, creation time, and author. Ideal for version history queries, release analytics, and automated version management.
Input Parameters:
- RepositoryId: The ID or URL-encoded path of the repository. Supports two formats: (1) Numeric project ID (e.g., '12345'), or (2) Full path with namespace (e.g., 'group/subgroup/project'). You can obtain this value from the project's Settings page or by calling the 'List Projects' or 'Search Projects' action. Example: 'mygroup/myproject'
Options:
- GitlabUrl: The base URL of the GitLab instance. Default is https://gitlab.com for GitLab.com. If you are using self-hosted GitLab or GitLab regional instances (e.g., EU), provide the custom URL here. Example: 'https://gitlab.example.com'
- PerPage: Number of releases to return per page (pagination size). Must be between 1 and 100. Use smaller values (e.g., 20) for faster responses, larger values (e.g., 100) to reduce API calls. Default: 20. Example: 50
- Page: Page number to retrieve (1-indexed). Use the Pagination.has_more field from the response to determine if more pages are available. Default: 1. Example: 1
- TokenAuthType: Authentication method. Use 'Bearer' (recommended for GitLab 12+ with OAuth2 or Personal Access Token) or 'PRIVATE-TOKEN' (legacy method for self-hosted internal deployments). Default: Bearer. Allowed values: Bearer, PRIVATE-TOKEN
- OrderBy: Sort releases by a specific field. Available values: 'released_at' (sort by release date/time), 'created_at' (sort by creation date/time). Default: released_at. Example: 'released_at'
- Sort: Sort order direction. Available values: 'desc' (descending, newest first), 'asc' (ascending, oldest first). Default: desc. Example: 'desc'
- IncludeHtmlDescription: Whether to include HTML-rendered release description in the response. If set to true, the response will include an additional 'description_html' field with the HTML version of the release notes (Markdown converted to HTML). Default: false. Use true when you need to display release notes in a web UI. Example: false
Output:
- Releases (object-array): Array of complete GitLab Release objects. Each Release object contains the following fields:
Basic Information:
- tag_name (string): Tag name associated with this release (e.g., 'v1.0.0')
- name (string): Display name of the release
- description (string): Release notes in Markdown format
- created_at (string): Creation timestamp in ISO 8601 format
- released_at (string): Official release timestamp in ISO 8601 format
Author Information:
- author (object): Creator of this release
- id (number): User ID
- name (string): Display name
- username (string): Login username
- avatar_url (string): Profile picture URL
Commit Information:
- commit (object): Associated Git commit
- id (string): Full commit SHA
- short_id (string): Abbreviated commit SHA
- title (string): Commit message title
- message (string): Full commit message
- created_at (string): Commit timestamp
Milestones:
- milestones (array): List of associated milestones, each containing:
- id (number): Milestone ID
- title (string): Milestone title
- description (string): Milestone description
- state (string): Current state (active/closed)
- due_date (string): Target completion date
Assets:
- assets (object): Release assets collection
- count (number): Total number of assets
- links (array): External download links, each containing:
- id (number): Link ID
- name (string): Link display name
- url (string): Download URL
- link_type (string): Link type (e.g., 'other', 'image')
- sources (array): Source code archives, each containing:
- format (string): Archive format (zip/tar.gz/tar.bz2/tar)
- url (string): Download URL
Evidence:
- evidences (array): Release evidence records, each containing:
- sha (string): Evidence SHA checksum
- filepath (string): Evidence file path
- collected_at (string): Collection timestamp
Links:
- _links (object): Related resource links
- self (string): API endpoint for this release
- edit_url (string): Edit page URL
Agent can access nested fields using dot notation (e.g., Releases[0].author.name, Releases[0].assets.links[0].url). Empty array if no releases found or retrieval failed.
- Pagination (object): Pagination metadata object for navigating through release list pages. Contains the following fields:
- page (number): Current page number (1-indexed)
- per_page (number): Number of items per page
- total_count (number): Total number of releases across all pages
- total_pages (number): Total number of available pages
- has_more (boolean): Indicates whether more pages exist after the current page. Agent should check this field to determine if additional API calls are needed
- next_page (number or null): Next page number to fetch, or null if no more pages available
Agent can use Pagination.has_more to implement auto-pagination logic. Example: while Pagination.has_more is true, increment page parameter and call this workflow again.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging. Default value is 0 if the request did not reach the upstream server. Common values:
- 0: Request did not reach upstream API (network timeout or connection refused)
- 200: Successfully retrieved releases
- 400: Bad request (malformed parameters)
- 401: Unauthorized (invalid or expired token)
- 403: Forbidden (insufficient permissions to access this repository)
- 404: Repository not found
- 429: Rate limit exceeded
- 5xx: GitLab server internal error
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update a Release
Updates an existing release in a GitLab repository. Allows modification of release title, description (Markdown format), release date, associated milestones, and more. Supports partial updates (only specified fields are modified). Ideal for post-release corrections, changelog updates, and release information refinement.
Input Parameters:
- RepositoryId: The unique identifier of the GitLab repository. Can be either: (1) Numeric project ID (e.g., '12345'), or (2) URL-encoded path with namespace (e.g., 'mygroup/myproject' or 'mygroup%2Fmyproject'). The numeric ID can be found on the project's homepage. For path format, use 'group/subgroup/project' structure. Source: GitLab Projects API - https://docs.gitlab.com/ee/api/projects.html
- TagName: The git tag name associated with the release to update (e.g., 'v1.0.0', 'v2.1.3-beta', 'release-2024-01'). This tag must already exist in the repository. The tag name is used as the unique identifier for the release in GitLab's releases API. Source: GitLab Releases API - https://docs.gitlab.com/ee/api/releases/
Options:
- GitlabUrl: The base URL of the GitLab instance. Examples: 'https://gitlab.com' (default for GitLab SaaS), 'https://gitlab.example.com' (for self-hosted GitLab). This is the root URL without '/api/v4' suffix. The workflow will automatically append '/api/v4' and the appropriate endpoint path.
- ReleaseName: The new human-readable name for the release (optional). If provided, will update the release title. Examples: 'Version 1.0.0', 'Spring 2024 Release', 'Hotfix for CVE-2024-1234'. If not provided or empty, the release name will not be updated.
- Description: The new Markdown-formatted description for the release (optional). If provided, will update the release notes. Can include changelog, breaking changes, upgrade instructions, etc. Supports full Markdown syntax. If not provided or empty, the description will not be updated.
- ReleasedAt: Custom release date/time to update. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). Optional. If provided, will update the official release timestamp displayed in GitLab. Examples: '2024-03-15T10:00:00Z', '2024-12-31T23:59:59Z'. If not provided or empty, the released_at field will not be updated. Note: This is different from created_at which cannot be changed.
- AdditionalFields: Additional GitLab API fields for advanced configuration (JSON object). Optional. Supported fields:
1) milestones (array of strings): Milestone titles to associate with the release. This will replace existing milestone associations. Example: ["v1.0", "Q1 Release"]
2) assets_links (array of objects): Asset links to attach to the release. Each item should have 'name' and 'url' fields. Common use cases: binary downloads, documentation links, Docker images. Example: [{"name": "Windows Installer", "url": "https://example.com/app.exe"}, {"name": "Documentation", "url": "https://docs.example.com"}]
If not provided or empty, these fields will not be updated.
- TokenAuthType: The authentication method to use: 'Bearer' for OAuth2/Personal Access Token (default), or 'PRIVATE-TOKEN' for GitLab Private Token header.
Output:
- Release (object): The complete Release object returned from GitLab API containing all release information including tag_name, name, description, created_at, released_at, author, commit, assets (links, sources, evidence), milestones, and other metadata. Returns null if the update failed. Refer to GitLab Releases API documentation for full object schema.
- OriginalStatusCode (number): The original HTTP status code returned by the GitLab API (e.g., 200, 400, 401, 403, 404, 429, 500). Returns 0 if the request was not sent due to parameter validation failure or network error before reaching the API.
- StatusCode (number): Execution status code: -1 (parameter validation failed), 200 (success), 500 (network error, timeout, or API error). Check OriginalStatusCode for the actual HTTP status from GitLab.
- ErrorMessage (string): Detailed error message if the workflow execution failed. Empty string if successful. Includes information about parameter validation failures, network errors, timeouts, rate limiting, or HTTP errors from GitLab API.
Delete a Release
Deletes a release from a GitLab repository. Note: Only removes release metadata; the associated Git tag remains in the repository. Useful for cleaning up erroneous releases or retracting unpublished versions. This operation is irreversible. Compatible with GitLab.com and self-hosted instances.
Input Parameters:
- RepositoryId: The ID or URL-encoded path of the repository. Supports two formats: (1) Numeric project ID (e.g., '12345'), or (2) Full path with namespace (e.g., 'group/subgroup/project'). The path separator '/' will be automatically URL-encoded to '%2F'. You can obtain this value from the project's Settings page or by calling the 'List Projects' or 'Search Projects' action. Example: 'mygroup/myproject'
- TagName: The Git tag name of the release to delete. Must match exactly with an existing release tag (case-sensitive). Tag Naming Rules: Cannot contain spaces or special characters like ~, ^, :, ?, *, [; Cannot start with - or .; Cannot end with .lock; Typical format: 'v1.0.0', 'release-2024.01', 'prod-deploy-20240115'. Example: 'v1.0.0'
Options:
- GitlabUrl: The base URL of the GitLab instance. Default is https://gitlab.com for GitLab.com. If you are using self-hosted GitLab or GitLab regional instances (e.g., EU), provide the custom URL here. Example: 'https://gitlab.example.com'
- TokenAuthType: Authentication method, determines how the Access Token is transmitted in HTTP requests. Bearer (Recommended): For GitLab 12.0+ versions, supports OAuth2 and Personal Access Token. This is the modern GitLab standard. PRIVATE-TOKEN (Legacy): For older GitLab versions or self-hosted instances, uses Private Token authentication. If unsure, use the default 'Bearer'. How to Choose: GitLab.com users: use Bearer; GitLab 12+ self-hosted: use Bearer; GitLab 11 and below: use PRIVATE-TOKEN. Default: Bearer
Output:
- Success (bool): Whether the release was successfully deleted. True if deletion succeeded (HTTP 200), False otherwise. Note: Deleting a release only removes the release metadata; the Git tag remains in the repository.
- DeletedTagName (string): The tag name of the deleted release. Empty string if deletion failed. Example: 'v1.0.0'
- OriginalStatusCode (number): The original HTTP status code returned by the GitLab API. Use for debugging. Default value is 0. 0 = Request did not reach the upstream API (network timeout/connection refused), 200 = Successfully deleted, 400 = Bad request, 401 = Unauthorized (invalid token), 403 = Forbidden (insufficient permissions), 404 = Release not found, 429 = Rate limit exceeded, 5xx = GitLab server error.
- StatusCode (number): Operation status code: 200 = Success (check ErrorMessage for business errors), -1 = Parameter validation error, 500 = System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
List Commits
Retrieves a list of commits from a GitLab repository with advanced filtering (date range, file path, author), keyword search, multiple sorting options (chronological, topological), and pagination. Returns an array of commit summaries. Ideal for commit history queries, change tracking, and statistical analysis.
Input Parameters:
- ProjectId: The ID or URL-encoded path of the project. Required.
How to find:
- Numeric ID: Go to project page → Settings → General → expand 'General project settings' → look for 'Project ID'
- Namespace path: Use the project's URL path (e.g., 'group/subgroup/project')
Examples:
- Numeric ID: '12345'
- Namespace path: 'gitlab-org/gitlab'
- With subgroup: 'mycompany/backend/api-service'
Options:
- GitlabUrl: The base URL of the GitLab instance. Default: https://gitlab.com. For self-hosted GitLab, provide your custom URL. Examples: 'https://gitlab.com', 'https://gitlab.example.com'
- BranchName: The branch or tag name to retrieve commits from. If empty, uses the repository's default branch (usually 'main' or 'master'). Examples: 'main', 'develop', 'v1.0.0', 'feature/login'
- StartTime: Start date/time for filtering commits (inclusive). Only commits after or on this date will be returned. ISO 8601 format. Example: '2024-01-01T00:00:00Z'
- EndTime: End date/time for filtering commits (inclusive). Only commits before or on this date will be returned. ISO 8601 format. Example: '2024-12-31T23:59:59Z'
- TokenAuthType: Authentication method for API requests.
Options:
- 'Bearer' (Recommended): Modern OAuth2-compatible method. Use this for GitLab 12+ with Personal Access Tokens or OAuth2 tokens. This is the industry-standard approach.
- 'PRIVATE-TOKEN': Legacy API token method (deprecated in GitLab 13+). Only use this for compatibility with older GitLab versions.
Why Bearer is recommended: Better security practices, OAuth2 compliance, and future-proof.
Default: Bearer
- PerPage: Number of commits to return per page. Valid range: 1-100. Default: 20
- Page: Page number for pagination (starts at 1). Use with PerPage for pagination. Default: 1
- AdditionalFields: Optional advanced filtering parameters as JSON object.
Supported fields:
- path (string): Filter commits that touch a specific file path. Example: "src/main.py", "docs/README.md"
- all (bool): Retrieve commits from all branches, not just the specified branch. Default: false
- with_stats (bool): Include statistics (additions, deletions, total changes) for each commit. Warning: This makes the API slower. Default: false
- first_parent (bool): Only follow the first parent commit in merge commits (ignores merged-in branches). Use case: View main branch history without feature branch commits. Default: false
- order (string): Sort order for commits
- 'default': Chronological order (newest first)
- 'topo': Topological order (useful for visualizing merge history and parent-child relationships)
Example: {"path": "src/main.py", "with_stats": true, "order": "topo"}
Output:
- Commits (object-array): Array of commit objects. Each commit contains:
Always present:
- id (full SHA), short_id, title, message
- author_name, author_email, authored_date
- committer_name, committer_email, committed_date
- web_url, parent_ids (array)
Conditionally present:
- stats object (only when AdditionalFields.with_stats=true): Contains additions, deletions, total changes
Special cases:
- Empty array if no commits found or error occurred
- Pagination (object): Pagination metadata object containing:
Fields:
- total: Total number of commits matching the filters
- total_pages: Total number of pages
- per_page: Items per page (requested)
- page: Current page number
- next_page: Next page number. 0 means no next page (last page reached)
- prev_page: Previous page number. 0 means no previous page (first page)
- OriginalStatusCode (number): The original HTTP status code returned by the GitLab API. Use for debugging. 0 = Request did not reach API, 200 = Success, 401 = Unauthorized, 403 = Forbidden, 404 = Project/ref not found, 429 = Rate limit exceeded, 5xx = Server error.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Commit Diff
Retrieves the file changes (diff) of a specific commit from a GitLab repository. Shows additions, modifications, and deletions for each file in unified diff format. Returns file paths, change modes, and diff content. Ideal for code reviews, change tracking, and automated analysis workflows.
Input Parameters:
- ProjectId: The ID or URL-encoded path of the project. Supports numeric ID (e.g., '12345') or namespace path (e.g., 'group/project'). Required.
- Sha: Commit identifier. Supports multiple formats: By Commit SHA - Full SHA: '4c24c8a4fc00046172e2f52d92276f8c83a43147', Short SHA: '4c24c8a4' (must be unique); By Branch/Tag Name - Branch: 'main' (gets the latest commit on this branch), Tag: 'v1.0.0' (gets the commit tagged with this version). Recommended: Use full SHA for stable references. Use branch name if you want the latest changes.
Options:
- GitlabUrl: The base URL of the GitLab instance. Default: https://gitlab.com. For self-hosted GitLab, provide your custom URL. Examples: 'https://gitlab.com', 'https://gitlab.example.com'
- Unidiff: Output format control. false (default, recommended): Returns structured JSON diff data, easier for downstream processing. true: Returns unified diff format (same as 'git diff' command), suitable for human reading or patch generation. Tip: Use false unless you need to display diffs in a code review UI.
- TokenAuthType: Authentication method for GitLab API. Recommended (default): 'Bearer' - Use this for modern GitLab (version 12+) with Personal Access Token or OAuth login. Legacy: 'PRIVATE-TOKEN' - Use this only if you're connecting to an old GitLab server (version 11 or earlier). Tip: If unsure, leave this as default (Bearer).
Output:
- Diffs (object-array): Array of diff objects representing changes in each file. Empty if no changes or error occurred. Object Structure: diff (string): Actual diff content in unified diff format, new_path (string): File path after change, old_path (string): File path before change, a_mode (string): Old file mode (e.g., '100644'), b_mode (string): New file mode, new_file (boolean): True if this is a newly created file, renamed_file (boolean): True if file was renamed, deleted_file (boolean): True if file was deleted
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Commit Comments
Retrieves all comments on a specific commit from a GitLab repository. Supports both GitLab.com and self-hosted GitLab instances. Returns an array of comment objects with author information, timestamps, and content. Can be used to analyze code review feedback, track discussions, or generate commit activity reports.
Input Parameters:
- ProjectId: The ID or URL-encoded path of the project. Supports two formats: (1) Numeric project ID (e.g., '12345'), or (2) Full path with namespace (e.g., 'group/subgroup/project'). You can obtain this from the project's Settings page or by calling 'List Projects' workflow. Example: 'mygroup/myproject'
- Sha: The commit SHA hash, branch name, or tag name. How it works: (1) SHA (recommended): Use full 40-character SHA or short SHA (7+ chars) for precise targeting. Example: '4c24c8a4fc00046172e2f52d92276f8c83a43147'. (2) Branch: Resolves to the latest commit on the branch. Example: 'main', 'develop'. (3) Tag: Resolves to the tagged commit. Example: 'v1.0.0'. Note: If the branch/tag is deleted or doesn't exist, API will return 404 error.
Options:
- GitlabUrl: The base URL of the GitLab instance. Default is https://gitlab.com for GitLab.com. If you are using self-hosted GitLab, provide the custom URL here. Examples: 'https://gitlab.com' (default), 'https://gitlab.example.com' (self-hosted)
- TokenAuthType: Authentication method. Options: 'Bearer' (recommended for GitLab 12+ with OAuth2 or Personal Access Token), 'PRIVATE-TOKEN' (legacy method for older GitLab versions). Default: Bearer
- Page: Page number for pagination (1-based). Default: 1. Use this parameter to retrieve comments in batches. Combine with PerPage to control data volume and avoid token waste.
- PerPage: Number of comments per page. Default: 20. Range: 1-100. Recommended: 100 for bulk operations to minimize API calls, 20 for interactive use to reduce response time.
Output:
- Comments (object-array): Array of comment objects for the current page. Each comment contains:
- note (string): The comment text/content
- author (object): Comment author information
- id (number): Author's user ID
- username (string): Author's username
- name (string): Author's display name
- avatar_url (string): Author's avatar URL
- created_at (string): ISO 8601 timestamp when comment was created (e.g., '2024-01-15T10:30:00.000Z')
- line (number|null): Line number in the file (if inline comment, otherwise null)
- path (string|null): File path (if inline comment, otherwise null)
- line_type (string|null): Line type - 'new' or 'old' (if inline comment, otherwise null)
Empty array if no comments found on this page or request failed. Use Pagination.has_more to check if there are more pages.
- CommentCount (number): The number of comments returned in the current page (length of Comments array). This is NOT the total count across all pages. Use Pagination.total_count for the total number. Returns 0 if no comments on this page or request failed.
- Pagination (object): Pagination metadata object:
- current_page (number): Current page number (1-based)
- per_page (number): Number of comments per page
- total_count (number): Total number of comments across all pages
- total_pages (number): Total number of pages
- has_more (boolean): Whether there are more pages to fetch (true if current_page < total_pages)
Example: {"current_page": 1, "per_page": 20, "total_count": 42, "total_pages": 3, "has_more": true}
Use this information to implement pagination logic: If has_more is true, increment Page parameter and call the workflow again to retrieve the next batch.
- OriginalStatusCode (number): The original HTTP status code returned by the GitLab API. Use for debugging. 0=Request did not reach API, 200=Success, 401=Unauthorized, 403=Forbidden, 404=Commit not found, 429=Rate limit exceeded, 5xx=Server error.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Post Comment to Commit
Adds a comment to a specific commit in a GitLab repository. Supports two comment types: general commit comments and inline code comments (targeting specific files and line numbers). Ideal for code reviews, commit feedback, and issue annotations. Supports Markdown format and team collaboration.
Input Parameters:
- ProjectId: The ID or URL-encoded path of the project. Supports numeric ID (e.g., '12345') or namespace path (e.g., 'group/project'). Required.
- Sha: The commit SHA hash. Full SHA (40 chars) or short SHA (7-8 chars). Examples: '4c24c8a4fc00046172e2f52d92276f8c83a43147', '4c24c8a4'. Required.
- Note: The text content of the comment. Supports Markdown formatting. Required.
Options:
- GitlabUrl: The base URL of the GitLab instance. Default: https://gitlab.com. For self-hosted GitLab, provide your custom URL. Examples: 'https://gitlab.com', 'https://gitlab.example.com'
- Path: The file path for inline comments. Leave empty for general commit comments. Example: 'src/main.py'
- Line: The line number for inline comments (1-based). Only applicable when Path is specified. 0 or empty = general comment. Example: 42
- LineType: The line type for inline comments. 'new' = comment on added/modified line, 'old' = comment on deleted/original line. Only applicable when Path and Line are specified. Default: new
- TokenAuthType: Authentication method. Use 'Bearer' (recommended for GitLab 12+ with PAT or OAuth2) or 'PRIVATE-TOKEN' (legacy method). Default: Bearer
Output:
- Comment (object): The created comment object returned from GitLab API. Contains fields: note (comment text), path (file path, may be null), line (line number, may be null), line_type ('new' or 'old', may be null), created_at (ISO 8601 timestamp), author (object with id, username, name, state, avatar_url, web_url). Empty object if error occurred.
- OriginalStatusCode (number): The original HTTP status code returned by the GitLab API. Use for debugging. 0 = Request did not reach API, 201 = Comment created successfully, 401 = Unauthorized, 403 = Forbidden, 404 = Commit not found, 422 = Validation error (invalid path/line), 429 = Rate limit exceeded, 5xx = Server error.
- StatusCode (number): Operation status code: 201=Success (comment created, check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
List Files
Lists files and subdirectories in a specified directory of a GitLab repository. Supports recursive traversal, branch/tag/commit specification, and pagination. Returns an array of files/directories with name, path, type, size, mode, and more. Ideal for file browsing, directory structure analysis, and automated file processing.
Input Parameters:
- RepositoryId: The repository identifier. Supports: 1) Numeric ID (e.g., '123456'), 2) Path with groups (e.g., 'group/project' or 'group/subgroup/project'), 3) Auto URL-encoding for special characters. Examples: '123', 'my-group/my-project'. How to get: From GitLab project URL, or call List Projects Action to get numeric ID, or use project path directly. Contact GitLab admin if 404 occurs.
Options:
- GitlabUrl: The base URL of the GitLab instance. Examples: https://gitlab.com (official SaaS), https://gitlab.company.com (self-hosted), http://localhost:8080 (local development). Default: https://gitlab.com
- Branch: The branch name to list files from. Examples: 'main', 'master', 'develop', 'feature/new-feature'. Default: main. Note: Older projects may use 'master' as default. Check your project settings if unsure.
- Path: The directory path within the repository to list files from. Examples: 'docs/' (trailing slash optional), 'src/components', '' (empty for root directory). Note: Both 'docs' and 'docs/' are valid.
- Page: Page number for paginated results. Default: 1
- PerPage: Number of items per page (max: 100). Default: 20
- Recursive: Recursively list all files in subdirectories. Default: false (only list current directory)
- TokenAuthType: Authentication method: 'Bearer' (recommended, for GitLab 12+ and OAuth2/PAT) or 'PRIVATE-TOKEN' (legacy, for older versions). Most users should use default value. Default: Bearer
Output:
- Files (object-array): Complete array of file objects from GitLab API. Each file is an object with: id (string): Unique file identifier, name (string): File or directory name, type (string): 'blob' (file) or 'tree' (directory), path (string): Full path from repository root, mode (string): Unix file permissions in octal (e.g., '100644' for regular file), size (number, optional): File size in bytes (only for type=blob). Empty array if no files found.
- Pagination (object): Pagination metadata. Contains: page (number): Current page number, per_page (number): Items per page, total (number): Total file count, total_pages (number): Total number of pages, has_more (boolean): Indicates more pages exist.
- RetryAfter (number): Seconds to wait before retrying (only present when OriginalStatusCode=429). Example: 60
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Raw File from Repository
Retrieves the raw content of a file from a GitLab repository without Base64 encoding. Supports specifying branch, tag, or commit SHA. Returns file text content and MIME type directly. Ideal for reading configuration files, scripts, documentation content, and automated file processing workflows.
Input Parameters:
- ProjectId: The ID or URL-encoded path of the project.
How to find:
- Numeric ID: Go to GitLab project page > Settings > General, copy the Project ID
- Path format: Use group/project (e.g., gitlab-org/gitlab)
Examples:
- Numeric ID: 123
- Path: mygroup/myproject
- Nested path: namespace/group/project
Note: Paths are automatically URL-encoded.
- FilePath: The full path to the file in the repository.
Examples:
- README.md
- src/main.py
- docs/api/guide.md
Note: Path is automatically URL-encoded.
Options:
- GitlabUrl: GitLab instance URL.
Examples:
- Cloud: https://gitlab.com
- Self-managed: https://gitlab.example.com
Default: https://gitlab.com
- Ref: The name of branch, tag, or commit SHA to retrieve the file from.
Examples:
- Branch: main, develop
- Tag: v1.0.0
- Commit SHA: Short (7 chars, e.g., a1b2c3d) or full (40 chars, e.g., a1b2c3d4e5f6...)
Default: HEAD (latest commit on default branch)
- TokenAuthType: Authentication header type:
- Bearer: Modern OAuth2/PAT authentication (Recommended)
- PRIVATE-TOKEN: Legacy method for GitLab < v12.0
Default: Bearer
Note: Values are case-insensitive (converted to uppercase internally).
- Lfs: Whether to download large binary files stored in Git LFS (Large File Storage).
Background: Git LFS is used to store large files (videos, datasets, binaries) outside the repository. By default, you get a small 'pointer' file. Set to true to get the actual file content.
When to use:
- false (default): For most text files (code, config, docs)
- true: When you need the actual content of large binary files
Default: false
Output:
- RawContent (string): The raw text content of the file. Empty string if request failed.
- ContentType (string): The Content-Type header from the HTTP response (e.g., 'text/plain', 'application/json').
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
5. Example Usage
This section will guide you through creating a simple workflow to automatically create a new Issue in your GitLab project. When your monitoring system discovers a bug, it can trigger this workflow to automatically log it.
Workflow Overview
A basic workflow contains three nodes: Start -> Create an Issue -> Answer.
Step-by-Step Guide
- Add Tool Node:
- In the workflow canvas, click the "+" button to add a new node.
- Select the "Tools" tab in the pop-up panel.
- Find and select Gitlab in the tools list.
- In the Gitlab supported operations list, click to select Create an Issue, which will add a corresponding node to the canvas.
- Configure Node:
- Click the newly added Create an Issue node, and the configuration panel for this node will expand on the right side.
- Credentials Configuration: At the top of the panel, find the credentials field. Click the dropdown menu and select your configured Gitlab credentials.
- Parameter Filling:
- RepositoryId: Fill in the repository ID where you want to create the Issue. This can be a numeric ID, or in the format of username/project-name or organization-name/project-name, for example my-org/my-awesome-project.
- Title: Enter a clear title for the Issue you want to create, for example [BUG] User login page is slow to respond.
- (Optional) Description: In this field, you can describe the Issue content in detail, supporting Markdown format. For example, you can provide reproduction steps, expected behavior, and actual behavior.
- (Optional) Labels: If you want to add labels to the Issue for categorization, you can enter them here, comma-separated, for example bug,performance,high-priority.
- Run and Verify:
- When all required parameters are filled in correctly, the error message in the upper right corner of the workflow canvas will disappear.
- Click the "Test Run" button in the upper right corner of the canvas to execute the workflow.
- After successful execution, you can click the log icon in the upper right corner to view the detailed input and output of the node. The output will contain the IssueId and IssueWebUrl of the newly created Issue, and you can click the link to jump directly to GitLab to view and verify whether the operation was successful.
Final Workflow Display
After completing the above steps, your entire workflow is configured. Whenever this workflow is triggered, a new Issue will be automatically created in your specified GitLab repository, greatly improving the efficiency of issue tracking.
6. FAQs
Q: Why do I always receive 401 Unauthorized or 403 Forbidden errors?
A: This is usually related to your credentials (Personal Access Token). Please check the following:
- Is the token valid: Ensure your Personal Access Token has not expired.
- Permission Scope: Check whether you granted sufficient permissions when creating the token. For most operations, at least the api scope is required.
- Is the token correct: Confirm that the token filled in your GoInsight credential configuration is complete and correct.
Q: How do I find my RepositoryId?
A: You have two ways to specify a repository:
- Path: The simplest way is to use the path from the URL, in the format group-name/project-name or user-name/project-name.
- Numeric ID: You can find a unique numeric ID on the project's settings page.
Q: What is the difference between IssueId and IssueIid?
A: This is an important concept in GitLab:
- IssueId: This is a globally unique ID across your entire GitLab instance.
- IssueIid: This is the Internal ID, which is unique within a single project and is incremental. It is usually displayed in the UI as #1, #2, etc. Most API operations (such as editing, commenting) use IssueIid to locate issues in a specific project.
7. Official Documentation
For a deeper understanding of all available API endpoints and parameters, please refer to Gitlab Official API Documentation.
Leave a Reply.