|
| 1 | +--- |
| 2 | +title: "GitLab" |
| 3 | +--- |
| 4 | + |
| 5 | +Manage and react to changes in your GitLab repositories |
| 6 | + |
| 7 | +## Triggers |
| 8 | + |
| 9 | +<CardGrid> |
| 10 | + <LinkCard title="On Issue" href="#on-issue" description="Listen to issue events from GitLab" /> |
| 11 | +</CardGrid> |
| 12 | + |
| 13 | +import { CardGrid, LinkCard } from "@astrojs/starlight/components"; |
| 14 | + |
| 15 | +## Actions |
| 16 | + |
| 17 | +<CardGrid> |
| 18 | + <LinkCard title="Create Issue" href="#create-issue" description="Create a new issue in a GitLab project" /> |
| 19 | +</CardGrid> |
| 20 | + |
| 21 | +## Instructions |
| 22 | + |
| 23 | +When connecting using App OAuth: |
| 24 | +- Leave **Client ID** and **Secret** empty to start the setup wizard. |
| 25 | + |
| 26 | +When connecting using Personal Access Token: |
| 27 | +- Go to Preferences → Personal Access Token → Add New token |
| 28 | +- Use **Scopes**: api, read_user, read_api, write_repository, read_repository |
| 29 | +- Copy the token and paste it into the **Access Token** configuration field, then click **Save**. |
| 30 | + |
| 31 | +<a id="on-issue"></a> |
| 32 | + |
| 33 | +## On Issue |
| 34 | + |
| 35 | +The On Issue trigger starts a workflow execution when issue events occur in a GitLab project. |
| 36 | + |
| 37 | +### Use Cases |
| 38 | + |
| 39 | +- **Notify Slack** when an issue is created or assigned for triage |
| 40 | +- **Create a Jira issue** when a GitLab issue is created for traceability |
| 41 | +- **Update external dashboards** or close linked tickets when an issue is closed |
| 42 | + |
| 43 | +### Configuration |
| 44 | + |
| 45 | +- **Project** (required): GitLab project to monitor |
| 46 | +- **Actions** (required): Select which issue actions to listen for (opened, closed, reopened, etc.). Default: opened. |
| 47 | +- **Labels** (optional): Only trigger for issues with specific labels |
| 48 | + |
| 49 | +### Outputs |
| 50 | + |
| 51 | +- **Default channel**: Emits issue payload including issue IID, title, state, labels, assignees, author, and action type |
| 52 | + |
| 53 | +### Webhook Setup |
| 54 | + |
| 55 | +This trigger automatically sets up a GitLab webhook when configured. The webhook is managed by SuperPlane and will be cleaned up when the trigger is removed. |
| 56 | + |
| 57 | +### Example Data |
| 58 | + |
| 59 | +```json |
| 60 | +{ |
| 61 | + "data": { |
| 62 | + "assignees": [ |
| 63 | + { |
| 64 | + "avatar_url": "https://www.gravatar.com/avatar/abc123", |
| 65 | + "id": 1, |
| 66 | + "name": "John Doe", |
| 67 | + "username": "johndoe" |
| 68 | + } |
| 69 | + ], |
| 70 | + "event_type": "issue", |
| 71 | + "labels": [ |
| 72 | + { |
| 73 | + "color": "#dc3545", |
| 74 | + "created_at": "2026-01-01T00:00:00Z", |
| 75 | + "description": "Bug reports", |
| 76 | + "group_id": null, |
| 77 | + "id": 206, |
| 78 | + "project_id": 15, |
| 79 | + "template": false, |
| 80 | + "title": "bug", |
| 81 | + "type": "ProjectLabel", |
| 82 | + "updated_at": "2026-01-01T00:00:00Z" |
| 83 | + } |
| 84 | + ], |
| 85 | + "object_attributes": { |
| 86 | + "action": "open", |
| 87 | + "created_at": "2026-02-05T14:00:00Z", |
| 88 | + "description": "This is an example issue description for testing the webhook", |
| 89 | + "id": 301, |
| 90 | + "iid": 1, |
| 91 | + "state": "opened", |
| 92 | + "title": "Example Issue", |
| 93 | + "updated_at": "2026-02-05T14:00:00Z", |
| 94 | + "url": "https://gitlab.com/group/my-project/-/issues/1" |
| 95 | + }, |
| 96 | + "object_kind": "issue", |
| 97 | + "project": { |
| 98 | + "avatar_url": null, |
| 99 | + "default_branch": "main", |
| 100 | + "description": "Example project", |
| 101 | + "git_http_url": "https://gitlab.com/group/my-project.git", |
| 102 | + "git_ssh_url": "git@gitlab.com:group/my-project.git", |
| 103 | + "id": 15, |
| 104 | + "name": "my-project", |
| 105 | + "namespace": "group", |
| 106 | + "path_with_namespace": "group/my-project", |
| 107 | + "visibility_level": 20, |
| 108 | + "web_url": "https://gitlab.com/group/my-project" |
| 109 | + }, |
| 110 | + "repository": { |
| 111 | + "description": "Example project", |
| 112 | + "homepage": "https://gitlab.com/group/my-project", |
| 113 | + "name": "my-project", |
| 114 | + "url": "git@gitlab.com:group/my-project.git" |
| 115 | + }, |
| 116 | + "user": { |
| 117 | + "avatar_url": "https://www.gravatar.com/avatar/abc123", |
| 118 | + "email": "johndoe@example.com", |
| 119 | + "id": 1, |
| 120 | + "name": "John Doe", |
| 121 | + "username": "johndoe" |
| 122 | + } |
| 123 | + }, |
| 124 | + "timestamp": "2026-02-05T14:00:00.000000000Z", |
| 125 | + "type": "gitlab.issue" |
| 126 | +} |
| 127 | +``` |
| 128 | + |
| 129 | +<a id="create-issue"></a> |
| 130 | + |
| 131 | +## Create Issue |
| 132 | + |
| 133 | +The Create Issue component creates a new issue in a specified GitLab project. |
| 134 | + |
| 135 | +### Use Cases |
| 136 | + |
| 137 | +- **Automated Bug Reporting**: Create issues when a monitoring system detects an error |
| 138 | +- **Task Management**: Automatically create tasks for new employee onboarding |
| 139 | +- **Feedback Loop**: Turn customer feedback into actionable issues |
| 140 | + |
| 141 | +### Configuration |
| 142 | + |
| 143 | +- **Project** (required): The GitLab project where the issue will be created |
| 144 | +- **Title** (required): The title of the new issue |
| 145 | +- **Description** (optional): The description/body of the issue |
| 146 | +- **Assignees** (optional): Users to assign the issue to |
| 147 | +- **Labels** (optional): Labels to apply to the issue (e.g., bug, enhancement) |
| 148 | +- **Milestone** (optional): Milestone to associate with the issue |
| 149 | +- **Due Date** (optional): Date when the issue is due |
| 150 | + |
| 151 | +### Output |
| 152 | + |
| 153 | +The component outputs the created issue object, including: |
| 154 | +- **id**: The internal ID of the issue |
| 155 | +- **iid**: The project-relative ID of the issue |
| 156 | +- **web_url**: The URL to view the issue in GitLab |
| 157 | +- **state**: The current state of the issue (opened/closed) |
| 158 | + |
| 159 | +### Example Output |
| 160 | + |
| 161 | +```json |
| 162 | +{ |
| 163 | + "data": { |
| 164 | + "_links": { |
| 165 | + "award_emoji": "http://gitlab.example.com/api/v4/projects/1/issues/1/award_emoji", |
| 166 | + "notes": "http://gitlab.example.com/api/v4/projects/1/issues/1/notes", |
| 167 | + "project": "http://gitlab.example.com/api/v4/projects/1", |
| 168 | + "self": "http://gitlab.example.com/api/v4/projects/1/issues/1" |
| 169 | + }, |
| 170 | + "assignee": { |
| 171 | + "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon", |
| 172 | + "id": 1, |
| 173 | + "name": "Administrator", |
| 174 | + "state": "active", |
| 175 | + "username": "root", |
| 176 | + "web_url": "http://gitlab.example.com/root" |
| 177 | + }, |
| 178 | + "assignees": [ |
| 179 | + { |
| 180 | + "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon", |
| 181 | + "id": 1, |
| 182 | + "name": "Administrator", |
| 183 | + "state": "active", |
| 184 | + "username": "root", |
| 185 | + "web_url": "http://gitlab.example.com/root" |
| 186 | + } |
| 187 | + ], |
| 188 | + "author": { |
| 189 | + "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon", |
| 190 | + "id": 1, |
| 191 | + "name": "Administrator", |
| 192 | + "state": "active", |
| 193 | + "username": "root", |
| 194 | + "web_url": "http://gitlab.example.com/root" |
| 195 | + }, |
| 196 | + "blocking_issues_count": 0, |
| 197 | + "closed_at": null, |
| 198 | + "closed_by": null, |
| 199 | + "confidential": false, |
| 200 | + "created_at": "2023-01-01T10:00:00.000Z", |
| 201 | + "description": "This is an example issue created via SuperPlane", |
| 202 | + "discussion_locked": null, |
| 203 | + "downvotes": 0, |
| 204 | + "due_date": null, |
| 205 | + "has_tasks": false, |
| 206 | + "id": 1, |
| 207 | + "iid": 1, |
| 208 | + "issue_type": "issue", |
| 209 | + "labels": [ |
| 210 | + "bug", |
| 211 | + "urgent" |
| 212 | + ], |
| 213 | + "merge_requests_count": 0, |
| 214 | + "milestone": null, |
| 215 | + "project_id": 3, |
| 216 | + "references": { |
| 217 | + "full": "gitlab-org/gitlab-test#1", |
| 218 | + "relative": "#1", |
| 219 | + "short": "#1" |
| 220 | + }, |
| 221 | + "state": "opened", |
| 222 | + "task_completion_status": { |
| 223 | + "completed_count": 0, |
| 224 | + "count": 0 |
| 225 | + }, |
| 226 | + "time_stats": { |
| 227 | + "human_time_estimate": null, |
| 228 | + "human_total_time_spent": null, |
| 229 | + "time_estimate": 0, |
| 230 | + "total_time_spent": 0 |
| 231 | + }, |
| 232 | + "title": "Example Issue", |
| 233 | + "type": "ISSUE", |
| 234 | + "updated_at": "2023-01-01T10:00:00.000Z", |
| 235 | + "upvotes": 0, |
| 236 | + "user_notes_count": 0, |
| 237 | + "web_url": "http://gitlab.example.com/gitlab-org/gitlab-test/issues/1", |
| 238 | + "weight": null |
| 239 | + }, |
| 240 | + "timestamp": "2023-01-01T10:00:00.000Z", |
| 241 | + "type": "gitlab.issue" |
| 242 | +} |
| 243 | +``` |
| 244 | + |
0 commit comments