@gitlab/opencode-gitlab-plugin 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/LICENSE +28 -0
- package/README.md +199 -233
- package/dist/gitlab-opencode-gitlab-plugin-1.0.6.tgz +0 -0
- package/package.json +1 -1
- package/dist/gitlab-opencode-gitlab-plugin-1.0.4.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [1.0.6](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.0.5...v1.0.6) (2026-01-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 📚 Documentation
|
|
9
|
+
|
|
10
|
+
* update tool documentation to reflect actual implementation ([b1dd47c](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/b1dd47c07c91cbac9a0ec6df7dba8ba63e39f359))
|
|
11
|
+
|
|
12
|
+
## [1.0.5](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.0.4...v1.0.5) (2026-01-07)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 📚 Documentation
|
|
16
|
+
|
|
17
|
+
* add required GitLab handbook documentation files ([46a2a53](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/46a2a5302330b24e5b7506bdfc70fe0141ce16ed))
|
|
18
|
+
|
|
5
19
|
## [1.0.4](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.0.3...v1.0.4) (2026-01-07)
|
|
6
20
|
|
|
7
21
|
|
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Copyright (c) 2011-present GitLab Inc.
|
|
2
|
+
|
|
3
|
+
Portions of this software are licensed as follows:
|
|
4
|
+
|
|
5
|
+
* All content residing under the "doc/" directory of this repository is licensed under "Creative Commons: CC BY-SA 4.0 license".
|
|
6
|
+
* All content that resides under the "ee/" directory of this repository, if that directory exists, is licensed under the license defined in "ee/LICENSE".
|
|
7
|
+
* All content that resides under the "jh/" directory of this repository, if that directory exists, is licensed under the license defined in "jh/LICENSE".
|
|
8
|
+
* All client-side JavaScript (when served directly or after being compiled, arranged, augmented, or combined), is licensed under the "MIT Expat" license.
|
|
9
|
+
* All third party components incorporated into the GitLab Software are licensed under the original license provided by the owner of the applicable component.
|
|
10
|
+
* Content outside of the above mentioned directories or restrictions above is available under the "MIT Expat" license as defined below.
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@gitlab/opencode-gitlab-plugin)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
A comprehensive GitLab API plugin for OpenCode that provides AI-powered access to GitLab's REST API. This plugin enables seamless interaction with merge requests, issues, pipelines, repositories, epics, and more through natural language commands.
|
|
7
|
+
A comprehensive GitLab API plugin for OpenCode that provides AI-powered access to GitLab's REST API. This plugin enables seamless interaction with merge requests, issues, pipelines, repositories, epics, snippets, audit events, and more through natural language commands.
|
|
8
8
|
|
|
9
9
|
## 📋 Table of Contents
|
|
10
10
|
|
|
@@ -27,13 +27,17 @@ A comprehensive GitLab API plugin for OpenCode that provides AI-powered access t
|
|
|
27
27
|
- **🔀 Merge Requests**: Full CRUD operations, discussions, notes, changes, commits, and pipelines
|
|
28
28
|
- **📝 Issues**: Create, read, update, and comment on issues with advanced filtering
|
|
29
29
|
- **🎯 Work Items**: Unified interface for issues, epics, tasks, and other work tracking items
|
|
30
|
-
- **🚀 CI/CD Pipelines**: Monitor, analyze,
|
|
31
|
-
- **📦 Repository Operations**: File management, commits, branches, and
|
|
32
|
-
- **🔍 Advanced Search**: Multi-scope search across projects, code, issues,
|
|
30
|
+
- **🚀 CI/CD Pipelines**: Monitor, analyze, retry pipeline jobs, and validate CI/CD configurations
|
|
31
|
+
- **📦 Repository Operations**: File management, commits, branches, tree navigation, and commit discussions
|
|
32
|
+
- **🔍 Advanced Search**: Multi-scope search across projects, code, issues, merge requests, commits, users, milestones, and documentation
|
|
33
33
|
- **📊 Epics**: Enterprise-level epic management with issue associations
|
|
34
|
+
- **💬 Snippets**: Snippet discussions, notes, and comments management
|
|
35
|
+
- **🔗 Universal Discussions**: Unified interface for discussions across all GitLab resources
|
|
34
36
|
- **✅ TODOs**: Personal task management and notifications
|
|
35
37
|
- **🔒 Security**: Vulnerability scanning and security report access
|
|
36
38
|
- **📚 Wiki**: Wiki page content retrieval
|
|
39
|
+
- **🔍 Audit Events**: Track project, group, and instance-level security events
|
|
40
|
+
- **🔧 Git Commands**: Execute safe, read-only git operations
|
|
37
41
|
- **👥 Project Management**: Member management and project details
|
|
38
42
|
|
|
39
43
|
### Technical Features
|
|
@@ -267,141 +271,185 @@ Or for API tokens:
|
|
|
267
271
|
|
|
268
272
|
## 🛠️ Available Tools
|
|
269
273
|
|
|
270
|
-
The plugin provides **
|
|
274
|
+
The plugin provides **104 tools** organized into the following categories:
|
|
275
|
+
|
|
276
|
+
### Merge Request Tools (15 tools)
|
|
277
|
+
|
|
278
|
+
| Tool | Description |
|
|
279
|
+
| --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
280
|
+
| `gitlab_get_merge_request` | Get details of a specific merge request with title, description, state, author, assignees, reviewers, labels, and diff stats |
|
|
281
|
+
| `gitlab_list_merge_requests` | List merge requests with filtering by state, scope, and labels |
|
|
282
|
+
| `gitlab_create_merge_request` | Create a new merge request |
|
|
283
|
+
| `gitlab_update_merge_request` | Update merge request title, description, state, assignees, reviewers, and labels |
|
|
284
|
+
| `gitlab_get_mr_changes` | Get file changes/diffs for a merge request |
|
|
285
|
+
| `gitlab_list_mr_discussions` | List discussion threads on a merge request with nested notes |
|
|
286
|
+
| `gitlab_get_mr_discussion` | Get a specific discussion thread with all replies |
|
|
287
|
+
| `gitlab_list_mr_notes` | List all comments in flat structure (easier than nested discussions) |
|
|
288
|
+
| `gitlab_create_mr_note` | Add a comment or reply to a merge request discussion |
|
|
289
|
+
| `gitlab_create_mr_discussion` | Start a new discussion thread (optionally on specific code lines) |
|
|
290
|
+
| `gitlab_resolve_mr_discussion` | Mark a discussion as resolved after addressing feedback |
|
|
291
|
+
| `gitlab_unresolve_mr_discussion` | Reopen a resolved discussion |
|
|
292
|
+
| `gitlab_get_mr_commits` | Get all commits in a merge request |
|
|
293
|
+
| `gitlab_get_mr_pipelines` | Get all pipelines for a merge request |
|
|
294
|
+
| `gitlab_list_merge_request_diffs` | List file diffs with pagination support for large changesets |
|
|
295
|
+
|
|
296
|
+
### Issue Tools (10 tools)
|
|
297
|
+
|
|
298
|
+
| Tool | Description |
|
|
299
|
+
| ----------------------------------- | ---------------------------------------------------------------------------- |
|
|
300
|
+
| `gitlab_create_issue` | Create a new issue with title, description, labels, assignees, and milestone |
|
|
301
|
+
| `gitlab_get_issue` | Get issue details including state, author, assignees, labels, and comments |
|
|
302
|
+
| `gitlab_list_issues` | List issues with filtering by state, labels, assignee, and milestone |
|
|
303
|
+
| `gitlab_list_issue_notes` | List all comments including system notes |
|
|
304
|
+
| `gitlab_list_issue_discussions` | List discussion threads with nested notes |
|
|
305
|
+
| `gitlab_get_issue_discussion` | Get a specific discussion thread with context |
|
|
306
|
+
| `gitlab_create_issue_note` | Add a comment or reply to an issue discussion |
|
|
307
|
+
| `gitlab_get_issue_note` | Get a specific note by ID with full details |
|
|
308
|
+
| `gitlab_resolve_issue_discussion` | Mark an issue discussion as resolved |
|
|
309
|
+
| `gitlab_unresolve_issue_discussion` | Reopen a resolved issue discussion |
|
|
310
|
+
|
|
311
|
+
### Epic Tools (12 tools)
|
|
312
|
+
|
|
313
|
+
| Tool | Description |
|
|
314
|
+
| ------------------------------- | ----------------------------------------------------------------------------- |
|
|
315
|
+
| `gitlab_get_epic` | Get epic details with title, description, state, dates, and associated issues |
|
|
316
|
+
| `gitlab_list_epics` | List epics with filtering by state, author, and labels |
|
|
317
|
+
| `gitlab_create_epic` | Create a new epic in a group |
|
|
318
|
+
| `gitlab_update_epic` | Update epic title, description, labels, dates, and state |
|
|
319
|
+
| `gitlab_list_epic_issues` | Get all issues linked to an epic |
|
|
320
|
+
| `gitlab_add_issue_to_epic` | Link an issue to an epic |
|
|
321
|
+
| `gitlab_remove_issue_from_epic` | Unlink an issue from an epic |
|
|
322
|
+
| `gitlab_list_epic_notes` | List all comments on an epic |
|
|
323
|
+
| `gitlab_list_epic_discussions` | List discussion threads on an epic |
|
|
324
|
+
| `gitlab_create_epic_note` | Add a comment or reply to an epic discussion |
|
|
325
|
+
| `gitlab_get_epic_discussion` | Get a specific epic discussion thread |
|
|
326
|
+
| `gitlab_get_epic_note` | Get a specific epic note by ID |
|
|
327
|
+
|
|
328
|
+
### Pipeline Tools (8 tools)
|
|
329
|
+
|
|
330
|
+
| Tool | Description |
|
|
331
|
+
| ---------------------------------- | ---------------------------------------------------------- |
|
|
332
|
+
| `gitlab_list_pipelines` | List pipelines with filtering by status, ref, and username |
|
|
333
|
+
| `gitlab_get_pipeline` | Get pipeline details with jobs and status |
|
|
334
|
+
| `gitlab_list_pipeline_jobs` | List all jobs in a pipeline with optional scope filtering |
|
|
335
|
+
| `gitlab_get_job_log` | Get the log output of a specific CI job |
|
|
336
|
+
| `gitlab_retry_job` | Retry a failed or canceled job |
|
|
337
|
+
| `gitlab_get_pipeline_failing_jobs` | Get only failed jobs for easier debugging |
|
|
338
|
+
| `gitlab_lint_ci_config` | Validate CI/CD YAML configuration with project context |
|
|
339
|
+
| `gitlab_lint_existing_ci_config` | Validate existing .gitlab-ci.yml from repository |
|
|
340
|
+
|
|
341
|
+
### Repository Tools (16 tools)
|
|
342
|
+
|
|
343
|
+
| Tool | Description |
|
|
344
|
+
| --------------------------------- | ---------------------------------------------------------------------------- |
|
|
345
|
+
| `gitlab_get_file` | Get file contents from any branch, tag, or commit |
|
|
346
|
+
| `gitlab_get_commit` | Get commit details with metadata, author, and stats |
|
|
347
|
+
| `gitlab_list_commits` | List commits with filtering by branch, path, and dates |
|
|
348
|
+
| `gitlab_get_commit_diff` | Get diff for a specific commit |
|
|
349
|
+
| `gitlab_create_commit` | Create a commit with multiple file operations (create, update, delete, move) |
|
|
350
|
+
| `gitlab_list_repository_tree` | List files and directories at a given path |
|
|
351
|
+
| `gitlab_list_branches` | List all branches in a repository |
|
|
352
|
+
| `gitlab_list_commit_discussions` | List discussion threads on a commit |
|
|
353
|
+
| `gitlab_get_commit_discussion` | Get a specific commit discussion thread |
|
|
354
|
+
| `gitlab_create_commit_note` | Add a comment to a commit (optionally line-specific) |
|
|
355
|
+
| `gitlab_create_commit_discussion` | Start a new discussion on a commit |
|
|
356
|
+
| `gitlab_get_commit_comments` | Get all commit comments in flat structure |
|
|
357
|
+
|
|
358
|
+
### Search Tools (11 tools)
|
|
359
|
+
|
|
360
|
+
| Tool | Description |
|
|
361
|
+
| ----------------------------- | ------------------------------------------------------------------------------ |
|
|
362
|
+
| `gitlab_search` | Universal search across projects, issues, MRs, code, commits, users, and wikis |
|
|
363
|
+
| `gitlab_issue_search` | Specialized issue search with better filtering |
|
|
364
|
+
| `gitlab_merge_request_search` | Specialized merge request search with better filtering |
|
|
365
|
+
| `gitlab_blob_search` | Search code/text within repository files |
|
|
366
|
+
| `gitlab_commit_search` | Search commits by message, author, or SHA |
|
|
367
|
+
| `gitlab_group_project_search` | Search projects within a specific group |
|
|
368
|
+
| `gitlab_milestone_search` | Search milestones by title or description |
|
|
369
|
+
| `gitlab_note_search` | Search comments across issues, MRs, and commits (Premium/Ultimate) |
|
|
370
|
+
| `gitlab_user_search` | Search users by name or email |
|
|
371
|
+
| `gitlab_wiki_blob_search` | Search wiki content with advanced filters |
|
|
372
|
+
| `gitlab_documentation_search` | Search GitLab official documentation |
|
|
373
|
+
|
|
374
|
+
### Work Item Tools (6 tools)
|
|
375
|
+
|
|
376
|
+
| Tool | Description |
|
|
377
|
+
| ------------------------------ | -------------------------------------------------------- |
|
|
378
|
+
| `gitlab_get_work_item` | Get a work item (unified model for issues, epics, tasks) |
|
|
379
|
+
| `gitlab_list_work_items` | List work items in a project or group |
|
|
380
|
+
| `gitlab_get_work_item_notes` | Get all comments for a work item |
|
|
381
|
+
| `gitlab_create_work_item` | Create a new work item |
|
|
382
|
+
| `gitlab_update_work_item` | Update work item title, description, state, and labels |
|
|
383
|
+
| `gitlab_create_work_item_note` | Add a comment to a work item |
|
|
271
384
|
|
|
272
|
-
###
|
|
385
|
+
### Security Tools (8 tools)
|
|
273
386
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
MR --> Commits[gitlab_get_mr_commits]
|
|
285
|
-
MR --> Pipelines[gitlab_get_mr_pipelines]
|
|
286
|
-
```
|
|
387
|
+
| Tool | Description |
|
|
388
|
+
| ----------------------------------------- | ------------------------------------------------------------------------- |
|
|
389
|
+
| `gitlab_list_vulnerabilities` | List security vulnerabilities with filtering by state, severity, and type |
|
|
390
|
+
| `gitlab_get_vulnerability_details` | Get detailed vulnerability information with remediation |
|
|
391
|
+
| `gitlab_create_vulnerability_issue` | Create an issue linked to vulnerabilities (GraphQL) |
|
|
392
|
+
| `gitlab_dismiss_vulnerability` | Dismiss vulnerability with reason (GraphQL) |
|
|
393
|
+
| `gitlab_confirm_vulnerability` | Confirm a vulnerability as valid (GraphQL) |
|
|
394
|
+
| `gitlab_revert_vulnerability_to_detected` | Revert vulnerability state (GraphQL) |
|
|
395
|
+
| `gitlab_update_vulnerability_severity` | Update vulnerability severity level (GraphQL) |
|
|
396
|
+
| `gitlab_link_vulnerability_to_issue` | Link vulnerabilities to existing issue (GraphQL) |
|
|
287
397
|
|
|
288
|
-
|
|
289
|
-
| ----------------------------- | ------------------------------------------ |
|
|
290
|
-
| `gitlab_get_merge_request` | Get details of a specific merge request |
|
|
291
|
-
| `gitlab_list_merge_requests` | List merge requests with filtering |
|
|
292
|
-
| `gitlab_create_merge_request` | Create a new merge request |
|
|
293
|
-
| `gitlab_update_merge_request` | Update an existing merge request |
|
|
294
|
-
| `gitlab_get_mr_changes` | Get file changes/diff for a merge request |
|
|
295
|
-
| `gitlab_list_mr_discussions` | List discussion threads on a merge request |
|
|
296
|
-
| `gitlab_list_mr_notes` | List all comments in flat structure |
|
|
297
|
-
| `gitlab_create_mr_note` | Add a comment to a merge request |
|
|
298
|
-
| `gitlab_get_mr_commits` | Get commits in a merge request |
|
|
299
|
-
| `gitlab_get_mr_pipelines` | Get pipelines for a merge request |
|
|
300
|
-
|
|
301
|
-
### Issue Tools (5 tools)
|
|
302
|
-
|
|
303
|
-
| Tool | Description |
|
|
304
|
-
| -------------------------- | ------------------------------- |
|
|
305
|
-
| `gitlab_create_issue` | Create a new issue in a project |
|
|
306
|
-
| `gitlab_get_issue` | Get details of a specific issue |
|
|
307
|
-
| `gitlab_list_issues` | List issues with filtering |
|
|
308
|
-
| `gitlab_list_issue_notes` | List all comments on an issue |
|
|
309
|
-
| `gitlab_create_issue_note` | Add a comment to an issue |
|
|
310
|
-
|
|
311
|
-
### Work Item Tools (7 tools)
|
|
312
|
-
|
|
313
|
-
| Tool | Description |
|
|
314
|
-
| ------------------------------ | ------------------------------------------ |
|
|
315
|
-
| `gitlab_get_work_item` | Get a single work item (issue, epic, task) |
|
|
316
|
-
| `gitlab_list_work_items` | List work items in a project or group |
|
|
317
|
-
| `gitlab_get_work_item_notes` | Get all comments for a work item |
|
|
318
|
-
| `gitlab_create_work_item` | Create a new work item |
|
|
319
|
-
| `gitlab_update_work_item` | Update an existing work item |
|
|
320
|
-
| `gitlab_create_work_item_note` | Add a comment to a work item |
|
|
321
|
-
|
|
322
|
-
### Pipeline Tools (6 tools)
|
|
323
|
-
|
|
324
|
-
| Tool | Description |
|
|
325
|
-
| ---------------------------------- | ---------------------------------- |
|
|
326
|
-
| `gitlab_list_pipelines` | List pipelines for a project |
|
|
327
|
-
| `gitlab_get_pipeline` | Get details of a specific pipeline |
|
|
328
|
-
| `gitlab_list_pipeline_jobs` | List jobs for a pipeline |
|
|
329
|
-
| `gitlab_get_job_log` | Get log output of a CI job |
|
|
330
|
-
| `gitlab_retry_job` | Retry a failed or canceled job |
|
|
331
|
-
| `gitlab_get_pipeline_failing_jobs` | Get all failed jobs in a pipeline |
|
|
332
|
-
|
|
333
|
-
### Repository Tools (9 tools)
|
|
334
|
-
|
|
335
|
-
| Tool | Description |
|
|
336
|
-
| ----------------------------- | ------------------------------------------ |
|
|
337
|
-
| `gitlab_get_file` | Get contents of a file from repository |
|
|
338
|
-
| `gitlab_get_commit` | Get a single commit with full details |
|
|
339
|
-
| `gitlab_list_commits` | List commits with filtering |
|
|
340
|
-
| `gitlab_get_commit_diff` | Get diff for a specific commit |
|
|
341
|
-
| `gitlab_create_commit` | Create a commit with multiple file actions |
|
|
342
|
-
| `gitlab_list_repository_tree` | List files and directories |
|
|
343
|
-
| `gitlab_list_branches` | List branches in a repository |
|
|
344
|
-
|
|
345
|
-
### Search Tools (4 tools)
|
|
346
|
-
|
|
347
|
-
| Tool | Description |
|
|
348
|
-
| ----------------------------- | -------------------------------------------------------- |
|
|
349
|
-
| `gitlab_search` | Search across GitLab (projects, issues, MRs, code, etc.) |
|
|
350
|
-
| `gitlab_issue_search` | Specialized issue search |
|
|
351
|
-
| `gitlab_blob_search` | Search file content in repositories |
|
|
352
|
-
| `gitlab_merge_request_search` | Specialized merge request search |
|
|
353
|
-
|
|
354
|
-
### Epic Tools (9 tools)
|
|
355
|
-
|
|
356
|
-
| Tool | Description |
|
|
357
|
-
| ------------------------------- | -------------------------------------- |
|
|
358
|
-
| `gitlab_get_epic` | Get details of a specific epic |
|
|
359
|
-
| `gitlab_list_epics` | List epics for a group |
|
|
360
|
-
| `gitlab_create_epic` | Create a new epic |
|
|
361
|
-
| `gitlab_update_epic` | Update an existing epic |
|
|
362
|
-
| `gitlab_list_epic_issues` | Get all issues associated with an epic |
|
|
363
|
-
| `gitlab_add_issue_to_epic` | Link an issue to an epic |
|
|
364
|
-
| `gitlab_remove_issue_from_epic` | Unlink an issue from an epic |
|
|
365
|
-
| `gitlab_list_epic_notes` | List all comments on an epic |
|
|
366
|
-
| `gitlab_create_epic_note` | Add a comment to an epic |
|
|
398
|
+
**Note**: All GraphQL-based security tools include automatic GID (Global ID) format validation.
|
|
367
399
|
|
|
368
400
|
### TODO Tools (4 tools)
|
|
369
401
|
|
|
370
|
-
| Tool | Description
|
|
371
|
-
| ---------------------------- |
|
|
372
|
-
| `gitlab_list_todos` | List TODO items for current user |
|
|
373
|
-
| `gitlab_mark_todo_done` | Mark a specific TODO as
|
|
374
|
-
| `gitlab_mark_all_todos_done` | Mark all TODOs as
|
|
375
|
-
| `gitlab_get_todo_count` | Get count of pending TODOs
|
|
402
|
+
| Tool | Description |
|
|
403
|
+
| ---------------------------- | ----------------------------------------------- |
|
|
404
|
+
| `gitlab_list_todos` | List TODO items for current user with filtering |
|
|
405
|
+
| `gitlab_mark_todo_done` | Mark a specific TODO as completed |
|
|
406
|
+
| `gitlab_mark_all_todos_done` | Mark all pending TODOs as completed |
|
|
407
|
+
| `gitlab_get_todo_count` | Get count of pending TODOs |
|
|
376
408
|
|
|
377
409
|
### Project & User Tools (3 tools)
|
|
378
410
|
|
|
379
|
-
| Tool | Description
|
|
380
|
-
| ----------------------------- |
|
|
381
|
-
| `gitlab_get_project` | Get details
|
|
382
|
-
| `gitlab_list_project_members` | List members of a project
|
|
383
|
-
| `gitlab_get_current_user` | Get
|
|
411
|
+
| Tool | Description |
|
|
412
|
+
| ----------------------------- | ---------------------------------- |
|
|
413
|
+
| `gitlab_get_project` | Get project details and metadata |
|
|
414
|
+
| `gitlab_list_project_members` | List all members of a project |
|
|
415
|
+
| `gitlab_get_current_user` | Get authenticated user information |
|
|
384
416
|
|
|
385
|
-
###
|
|
417
|
+
### Snippet Tools (5 tools)
|
|
418
|
+
|
|
419
|
+
| Tool | Description |
|
|
420
|
+
| ---------------------------------- | ---------------------------------------------- |
|
|
421
|
+
| `gitlab_list_snippet_discussions` | List discussion threads on a snippet |
|
|
422
|
+
| `gitlab_get_snippet_discussion` | Get a specific snippet discussion thread |
|
|
423
|
+
| `gitlab_list_snippet_notes` | List all comments on a snippet |
|
|
424
|
+
| `gitlab_create_snippet_note` | Add a comment or reply to a snippet discussion |
|
|
425
|
+
| `gitlab_create_snippet_discussion` | Start a new discussion on a snippet |
|
|
386
426
|
|
|
387
|
-
|
|
388
|
-
| ----------------------------------------- | ------------------------------------------------ |
|
|
389
|
-
| `gitlab_list_vulnerabilities` | List security vulnerabilities |
|
|
390
|
-
| `gitlab_get_vulnerability_details` | Get details for a specific vulnerability |
|
|
391
|
-
| `gitlab_create_vulnerability_issue` | Create issue linked to vulnerabilities (GraphQL) |
|
|
392
|
-
| `gitlab_dismiss_vulnerability` | Dismiss vulnerability with reason (GraphQL) |
|
|
393
|
-
| `gitlab_confirm_vulnerability` | Confirm a security vulnerability (GraphQL) |
|
|
394
|
-
| `gitlab_revert_vulnerability_to_detected` | Revert vulnerability to detected state (GraphQL) |
|
|
395
|
-
| `gitlab_update_vulnerability_severity` | Update vulnerability severity level (GraphQL) |
|
|
396
|
-
| `gitlab_link_vulnerability_to_issue` | Link existing issue to vulnerabilities (GraphQL) |
|
|
427
|
+
### Discussion Tools (2 tools)
|
|
397
428
|
|
|
398
|
-
|
|
429
|
+
| Tool | Description |
|
|
430
|
+
| ---------------------------- | -------------------------------------------------------------------------------------------- |
|
|
431
|
+
| `gitlab_reply_to_discussion` | Universal tool for replying to any discussion thread (MRs, issues, epics, commits, snippets) |
|
|
432
|
+
| `gitlab_get_discussion` | Universal tool for fetching discussion details from any resource type |
|
|
433
|
+
|
|
434
|
+
### Audit Event Tools (3 tools)
|
|
435
|
+
|
|
436
|
+
| Tool | Description |
|
|
437
|
+
| ----------------------------------- | -------------------------------------------------------- |
|
|
438
|
+
| `gitlab_list_project_audit_events` | List audit events for a project (requires owner role) |
|
|
439
|
+
| `gitlab_list_group_audit_events` | List audit events for a group (requires owner role) |
|
|
440
|
+
| `gitlab_list_instance_audit_events` | List instance-level audit events (requires admin access) |
|
|
441
|
+
|
|
442
|
+
### Git Command Tool (1 tool)
|
|
443
|
+
|
|
444
|
+
| Tool | Description |
|
|
445
|
+
| ----------------- | ------------------------------------------------------------------------------------------------------ |
|
|
446
|
+
| `run_git_command` | Execute safe, read-only git commands (status, log, show, diff, blame, etc.) with security restrictions |
|
|
399
447
|
|
|
400
448
|
### Wiki Tools (1 tool)
|
|
401
449
|
|
|
402
|
-
| Tool | Description
|
|
403
|
-
| ---------------------- |
|
|
404
|
-
| `gitlab_get_wiki_page` | Get
|
|
450
|
+
| Tool | Description |
|
|
451
|
+
| ---------------------- | ---------------------------------- |
|
|
452
|
+
| `gitlab_get_wiki_page` | Get wiki page content and metadata |
|
|
405
453
|
|
|
406
454
|
## 💡 Usage Examples
|
|
407
455
|
|
|
@@ -1131,129 +1179,44 @@ The plugin enforces HTTPS for all API calls. HTTP URLs are not supported.
|
|
|
1131
1179
|
|
|
1132
1180
|
## 🤝 Contributing
|
|
1133
1181
|
|
|
1134
|
-
Contributions are welcome! Please
|
|
1182
|
+
Contributions are welcome! Please see our [Contributing Guide](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/blob/main/CONTRIBUTING.md) for detailed guidelines on:
|
|
1135
1183
|
|
|
1136
|
-
|
|
1184
|
+
- Code style and conventions
|
|
1185
|
+
- Development workflow
|
|
1186
|
+
- Testing requirements
|
|
1187
|
+
- Submitting merge requests
|
|
1188
|
+
- Developer Certificate of Origin and License
|
|
1137
1189
|
|
|
1138
|
-
|
|
1139
|
-
graph TD
|
|
1140
|
-
A[Fork Repository] --> B[Create Feature Branch]
|
|
1141
|
-
B --> C[Make Changes]
|
|
1142
|
-
C --> D[Write Tests]
|
|
1143
|
-
D --> E[Run Linting]
|
|
1144
|
-
E --> F[Commit with Convention]
|
|
1145
|
-
F --> G[Push to Fork]
|
|
1146
|
-
G --> H[Create Merge Request]
|
|
1147
|
-
H --> I[Code Review]
|
|
1148
|
-
I --> J{Approved?}
|
|
1149
|
-
J -->|Yes| K[Merge to Main]
|
|
1150
|
-
J -->|No| C
|
|
1151
|
-
K --> L[Automated Release]
|
|
1152
|
-
```
|
|
1153
|
-
|
|
1154
|
-
### Steps to Contribute
|
|
1190
|
+
**Quick Start for Contributors**:
|
|
1155
1191
|
|
|
1156
|
-
1. **
|
|
1192
|
+
1. **Commit Messages**: Use conventional commits format
|
|
1157
1193
|
|
|
1158
|
-
```bash
|
|
1159
|
-
# Fork on GitLab UI, then clone
|
|
1160
|
-
git clone https://gitlab.com/YOUR_USERNAME/editor-extensions/opencode-gitlab-plugin.git
|
|
1161
1194
|
```
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
```bash
|
|
1166
|
-
git checkout -b feat/my-new-feature
|
|
1195
|
+
feat(scope): add new feature
|
|
1196
|
+
fix(scope): fix bug
|
|
1197
|
+
docs(scope): update documentation
|
|
1167
1198
|
```
|
|
1168
1199
|
|
|
1169
|
-
|
|
1170
|
-
- Follow TypeScript best practices
|
|
1171
|
-
- Add JSDoc comments for public APIs
|
|
1172
|
-
- Update documentation if needed
|
|
1173
|
-
|
|
1174
|
-
4. **Run quality checks**
|
|
1200
|
+
2. **Code Quality**: Ensure all checks pass
|
|
1175
1201
|
|
|
1176
1202
|
```bash
|
|
1177
1203
|
npm run lint
|
|
1178
|
-
npm run format
|
|
1179
|
-
npm run build
|
|
1180
1204
|
npm test
|
|
1181
1205
|
```
|
|
1182
1206
|
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
```bash
|
|
1186
|
-
git commit -m "feat: add new tool for project milestones"
|
|
1187
|
-
```
|
|
1188
|
-
|
|
1189
|
-
6. **Push and create MR**
|
|
1190
|
-
|
|
1191
|
-
```bash
|
|
1192
|
-
git push origin feat/my-new-feature
|
|
1193
|
-
# Create merge request on GitLab
|
|
1194
|
-
```
|
|
1195
|
-
|
|
1196
|
-
### Code Style
|
|
1197
|
-
|
|
1198
|
-
- **TypeScript**: Strict mode enabled
|
|
1199
|
-
- **ESLint**: Follow configured rules
|
|
1200
|
-
- **Prettier**: Auto-format on commit
|
|
1201
|
-
- **Line Length**: 100 characters max
|
|
1202
|
-
- **Indentation**: 2 spaces, no tabs
|
|
1203
|
-
|
|
1204
|
-
### Adding New Tools
|
|
1205
|
-
|
|
1206
|
-
To
|
|
1207
|
-
|
|
1208
|
-
---
|
|
1209
|
-
|
|
1210
|
-
## Assistant
|
|
1211
|
-
|
|
1212
|
-
add a new GitLab API tool:
|
|
1213
|
-
|
|
1214
|
-
1. **Add API method to GitLabApiClient**
|
|
1215
|
-
|
|
1216
|
-
```typescript
|
|
1217
|
-
async getProjectMilestones(projectId: string) {
|
|
1218
|
-
const encodedProject = this.encodeProjectId(projectId);
|
|
1219
|
-
return this.fetch<Record<string, unknown>[]>(
|
|
1220
|
-
'GET',
|
|
1221
|
-
`/projects/${encodedProject}/milestones`
|
|
1222
|
-
);
|
|
1223
|
-
}
|
|
1224
|
-
```
|
|
1225
|
-
|
|
1226
|
-
2. **Add tool definition**
|
|
1227
|
-
|
|
1228
|
-
```typescript
|
|
1229
|
-
gitlab_list_milestones: tool({
|
|
1230
|
-
description: 'List milestones for a project',
|
|
1231
|
-
args: {
|
|
1232
|
-
project_id: z.string().describe('The project ID or path'),
|
|
1233
|
-
state: z.enum(['active', 'closed', 'all']).optional(),
|
|
1234
|
-
},
|
|
1235
|
-
execute: async (args, _ctx) => {
|
|
1236
|
-
const client = getGitLabClient();
|
|
1237
|
-
const milestones = await client.getProjectMilestones(args.project_id);
|
|
1238
|
-
return JSON.stringify(milestones, null, 2);
|
|
1239
|
-
},
|
|
1240
|
-
});
|
|
1241
|
-
```
|
|
1242
|
-
|
|
1243
|
-
3. **Update documentation**
|
|
1244
|
-
- Add tool to README.md
|
|
1245
|
-
- Update tool count
|
|
1246
|
-
- Add usage example if applicable
|
|
1207
|
+
3. **Testing**: Add tests for new features
|
|
1247
1208
|
|
|
1248
1209
|
## 🔗 Links
|
|
1249
1210
|
|
|
1250
|
-
-
|
|
1251
|
-
-
|
|
1252
|
-
-
|
|
1253
|
-
-
|
|
1254
|
-
-
|
|
1255
|
-
-
|
|
1256
|
-
-
|
|
1211
|
+
- [GitLab Repository](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin)
|
|
1212
|
+
- [npm Package](https://www.npmjs.com/package/@gitlab/opencode-gitlab-plugin)
|
|
1213
|
+
- [Issue Tracker](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/issues)
|
|
1214
|
+
- [Merge Requests](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/merge_requests)
|
|
1215
|
+
- [Contributing Guide](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/blob/main/CONTRIBUTING.md)
|
|
1216
|
+
- [Changelog](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/blob/main/CHANGELOG.md)
|
|
1217
|
+
- [CI/CD Pipelines](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/pipelines)
|
|
1218
|
+
- [GitLab API Documentation](https://docs.gitlab.com/ee/api/)
|
|
1219
|
+
- [OpenCode Plugin SDK](https://github.com/opencode-ai/plugin)
|
|
1257
1220
|
|
|
1258
1221
|
## 🙏 Acknowledgments
|
|
1259
1222
|
|
|
@@ -1265,10 +1228,13 @@ add a new GitLab API tool:
|
|
|
1265
1228
|
|
|
1266
1229
|
For questions, issues, or feature requests:
|
|
1267
1230
|
|
|
1268
|
-
1. **Check existing issues**: <https://gitlab.com/
|
|
1231
|
+
1. **Check existing issues**: <https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/issues>
|
|
1269
1232
|
2. **Create new issue**: Use issue templates for bugs or features
|
|
1270
1233
|
3. **Discussions**: Use GitLab discussions for questions
|
|
1271
|
-
|
|
1234
|
+
|
|
1235
|
+
## 📄 License
|
|
1236
|
+
|
|
1237
|
+
This project is licensed under the MIT License - see the [LICENSE](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/blob/main/LICENSE) file for details.
|
|
1272
1238
|
|
|
1273
1239
|
---
|
|
1274
1240
|
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|