@gitlab/opencode-gitlab-plugin 1.0.1 → 1.0.5
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 +33 -0
- package/LICENSE +28 -0
- package/README.md +43 -131
- package/dist/gitlab-opencode-gitlab-plugin-1.0.5.tgz +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,39 @@
|
|
|
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.5](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.0.4...v1.0.5) (2026-01-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 📚 Documentation
|
|
9
|
+
|
|
10
|
+
* add required GitLab handbook documentation files ([46a2a53](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/46a2a5302330b24e5b7506bdfc70fe0141ce16ed))
|
|
11
|
+
|
|
12
|
+
## [1.0.4](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.0.3...v1.0.4) (2026-01-07)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug Fixes
|
|
16
|
+
|
|
17
|
+
* add npm authentication for npmjs.org publishing per official docs ([7d485c1](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/7d485c18129dfe4afa66489543fcab6c154b2ebe))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### ♻️ Code Refactoring
|
|
21
|
+
|
|
22
|
+
* simplify npmjs publishing to match gitlab-ai-provider setup ([2ed68ef](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/2ed68ef6080be5d2955b93bff9d43c3b74589bb2))
|
|
23
|
+
|
|
24
|
+
## [1.0.3](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.0.2...v1.0.3) (2026-01-07)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### 🐛 Bug Fixes
|
|
28
|
+
|
|
29
|
+
* use SIGSTORE_ID_TOKEN for npm provenance in GitLab CI ([202854f](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/202854f1dfe31cfeb3dee787722590397a615ace))
|
|
30
|
+
|
|
31
|
+
## [1.0.2](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.0.1...v1.0.2) (2026-01-07)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### 📚 Documentation
|
|
35
|
+
|
|
36
|
+
* update repository references to gitlab-org location ([414d833](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/commit/414d833d4ff84233ce99089a043ed6b2e4142bcf))
|
|
37
|
+
|
|
5
38
|
## [1.0.1](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/compare/v1.0.0...v1.0.1) (2026-01-07)
|
|
6
39
|
|
|
7
40
|
|
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# OpenCode GitLab Plugin
|
|
2
2
|
|
|
3
|
-
[](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/pipelines)
|
|
4
|
+
[](https://www.npmjs.com/package/@gitlab/opencode-gitlab-plugin)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
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.
|
|
@@ -154,43 +154,40 @@ sequenceDiagram
|
|
|
154
154
|
- GitLab account with API access
|
|
155
155
|
- GitLab Personal Access Token or OAuth token
|
|
156
156
|
|
|
157
|
-
### Install from
|
|
157
|
+
### Install from npm
|
|
158
158
|
|
|
159
159
|
```bash
|
|
160
|
-
# Configure npm to use GitLab Package Registry
|
|
161
|
-
npm config set @gitlab-org:registry https://gitlab.com/api/v4/projects/76386853/packages/npm/
|
|
162
|
-
|
|
163
160
|
# Install the package
|
|
164
|
-
npm install @
|
|
161
|
+
npm install @gitlab/opencode-gitlab-plugin
|
|
165
162
|
|
|
166
163
|
# Or with Bun
|
|
167
|
-
bun add @
|
|
164
|
+
bun add @gitlab/opencode-gitlab-plugin
|
|
168
165
|
|
|
169
166
|
# Or with yarn
|
|
170
|
-
yarn add @
|
|
167
|
+
yarn add @gitlab/opencode-gitlab-plugin
|
|
171
168
|
```
|
|
172
169
|
|
|
173
170
|
### Install from GitLab Repository (Development)
|
|
174
171
|
|
|
175
172
|
```bash
|
|
176
173
|
# Using npm
|
|
177
|
-
npm install git+https://gitlab.com/
|
|
174
|
+
npm install git+https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin.git
|
|
178
175
|
|
|
179
176
|
# Using Bun
|
|
180
|
-
bun add git+https://gitlab.com/
|
|
177
|
+
bun add git+https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin.git
|
|
181
178
|
```
|
|
182
179
|
|
|
183
180
|
### Install Specific Version
|
|
184
181
|
|
|
185
182
|
```bash
|
|
186
|
-
# Install specific version from
|
|
187
|
-
npm install @
|
|
183
|
+
# Install specific version from npm
|
|
184
|
+
npm install @gitlab/opencode-gitlab-plugin@1.0.0
|
|
188
185
|
|
|
189
186
|
# Install from specific git tag
|
|
190
|
-
npm install git+https://gitlab.com/
|
|
187
|
+
npm install git+https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin.git#v1.0.0
|
|
191
188
|
|
|
192
189
|
# Install from specific branch
|
|
193
|
-
npm install git+https://gitlab.com/
|
|
190
|
+
npm install git+https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin.git#main
|
|
194
191
|
```
|
|
195
192
|
|
|
196
193
|
### Using package.json
|
|
@@ -200,10 +197,7 @@ Add to your `package.json`:
|
|
|
200
197
|
```json
|
|
201
198
|
{
|
|
202
199
|
"dependencies": {
|
|
203
|
-
"@
|
|
204
|
-
},
|
|
205
|
-
"publishConfig": {
|
|
206
|
-
"@gitlab-org:registry": "https://gitlab.com/api/v4/projects/76386853/packages/npm/"
|
|
200
|
+
"@gitlab/opencode-gitlab-plugin": "^1.0.0"
|
|
207
201
|
}
|
|
208
202
|
}
|
|
209
203
|
```
|
|
@@ -233,7 +227,7 @@ Add the following plugin to your opencode configuration `~/.config/opencode/open
|
|
|
233
227
|
```json
|
|
234
228
|
{
|
|
235
229
|
"$schema": "https://opencode.ai/config.json",
|
|
236
|
-
"plugin": ["@
|
|
230
|
+
"plugin": ["@gitlab/opencode-gitlab-plugin"]
|
|
237
231
|
}
|
|
238
232
|
```
|
|
239
233
|
|
|
@@ -414,7 +408,7 @@ graph LR
|
|
|
414
408
|
### Example 1: Create and Manage Issues
|
|
415
409
|
|
|
416
410
|
```javascript
|
|
417
|
-
import gitlabPlugin from '@
|
|
411
|
+
import gitlabPlugin from '@gitlab/opencode-gitlab-plugin';
|
|
418
412
|
|
|
419
413
|
const plugin = await gitlabPlugin({});
|
|
420
414
|
|
|
@@ -717,7 +711,7 @@ opencode-gitlab-plugin/
|
|
|
717
711
|
|
|
718
712
|
```bash
|
|
719
713
|
# Clone the repository
|
|
720
|
-
git clone https://gitlab.com/
|
|
714
|
+
git clone https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin.git
|
|
721
715
|
cd opencode-gitlab-plugin
|
|
722
716
|
|
|
723
717
|
# Install dependencies
|
|
@@ -1137,129 +1131,44 @@ The plugin enforces HTTPS for all API calls. HTTP URLs are not supported.
|
|
|
1137
1131
|
|
|
1138
1132
|
## 🤝 Contributing
|
|
1139
1133
|
|
|
1140
|
-
Contributions are welcome! Please
|
|
1141
|
-
|
|
1142
|
-
### Contribution Workflow
|
|
1134
|
+
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:
|
|
1143
1135
|
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
D --> E[Run Linting]
|
|
1150
|
-
E --> F[Commit with Convention]
|
|
1151
|
-
F --> G[Push to Fork]
|
|
1152
|
-
G --> H[Create Merge Request]
|
|
1153
|
-
H --> I[Code Review]
|
|
1154
|
-
I --> J{Approved?}
|
|
1155
|
-
J -->|Yes| K[Merge to Main]
|
|
1156
|
-
J -->|No| C
|
|
1157
|
-
K --> L[Automated Release]
|
|
1158
|
-
```
|
|
1136
|
+
- Code style and conventions
|
|
1137
|
+
- Development workflow
|
|
1138
|
+
- Testing requirements
|
|
1139
|
+
- Submitting merge requests
|
|
1140
|
+
- Developer Certificate of Origin and License
|
|
1159
1141
|
|
|
1160
|
-
|
|
1142
|
+
**Quick Start for Contributors**:
|
|
1161
1143
|
|
|
1162
|
-
1. **
|
|
1144
|
+
1. **Commit Messages**: Use conventional commits format
|
|
1163
1145
|
|
|
1164
|
-
```bash
|
|
1165
|
-
# Fork on GitLab UI, then clone
|
|
1166
|
-
git clone https://gitlab.com/YOUR_USERNAME/opencode-gitlab-plugin.git
|
|
1167
1146
|
```
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
```bash
|
|
1172
|
-
git checkout -b feat/my-new-feature
|
|
1147
|
+
feat(scope): add new feature
|
|
1148
|
+
fix(scope): fix bug
|
|
1149
|
+
docs(scope): update documentation
|
|
1173
1150
|
```
|
|
1174
1151
|
|
|
1175
|
-
|
|
1176
|
-
- Follow TypeScript best practices
|
|
1177
|
-
- Add JSDoc comments for public APIs
|
|
1178
|
-
- Update documentation if needed
|
|
1179
|
-
|
|
1180
|
-
4. **Run quality checks**
|
|
1152
|
+
2. **Code Quality**: Ensure all checks pass
|
|
1181
1153
|
|
|
1182
1154
|
```bash
|
|
1183
1155
|
npm run lint
|
|
1184
|
-
npm run format
|
|
1185
|
-
npm run build
|
|
1186
1156
|
npm test
|
|
1187
1157
|
```
|
|
1188
1158
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
```bash
|
|
1192
|
-
git commit -m "feat: add new tool for project milestones"
|
|
1193
|
-
```
|
|
1194
|
-
|
|
1195
|
-
6. **Push and create MR**
|
|
1196
|
-
|
|
1197
|
-
```bash
|
|
1198
|
-
git push origin feat/my-new-feature
|
|
1199
|
-
# Create merge request on GitLab
|
|
1200
|
-
```
|
|
1201
|
-
|
|
1202
|
-
### Code Style
|
|
1203
|
-
|
|
1204
|
-
- **TypeScript**: Strict mode enabled
|
|
1205
|
-
- **ESLint**: Follow configured rules
|
|
1206
|
-
- **Prettier**: Auto-format on commit
|
|
1207
|
-
- **Line Length**: 100 characters max
|
|
1208
|
-
- **Indentation**: 2 spaces, no tabs
|
|
1209
|
-
|
|
1210
|
-
### Adding New Tools
|
|
1211
|
-
|
|
1212
|
-
To
|
|
1213
|
-
|
|
1214
|
-
---
|
|
1215
|
-
|
|
1216
|
-
## Assistant
|
|
1217
|
-
|
|
1218
|
-
add a new GitLab API tool:
|
|
1219
|
-
|
|
1220
|
-
1. **Add API method to GitLabApiClient**
|
|
1221
|
-
|
|
1222
|
-
```typescript
|
|
1223
|
-
async getProjectMilestones(projectId: string) {
|
|
1224
|
-
const encodedProject = this.encodeProjectId(projectId);
|
|
1225
|
-
return this.fetch<Record<string, unknown>[]>(
|
|
1226
|
-
'GET',
|
|
1227
|
-
`/projects/${encodedProject}/milestones`
|
|
1228
|
-
);
|
|
1229
|
-
}
|
|
1230
|
-
```
|
|
1231
|
-
|
|
1232
|
-
2. **Add tool definition**
|
|
1233
|
-
|
|
1234
|
-
```typescript
|
|
1235
|
-
gitlab_list_milestones: tool({
|
|
1236
|
-
description: 'List milestones for a project',
|
|
1237
|
-
args: {
|
|
1238
|
-
project_id: z.string().describe('The project ID or path'),
|
|
1239
|
-
state: z.enum(['active', 'closed', 'all']).optional(),
|
|
1240
|
-
},
|
|
1241
|
-
execute: async (args, _ctx) => {
|
|
1242
|
-
const client = getGitLabClient();
|
|
1243
|
-
const milestones = await client.getProjectMilestones(args.project_id);
|
|
1244
|
-
return JSON.stringify(milestones, null, 2);
|
|
1245
|
-
},
|
|
1246
|
-
});
|
|
1247
|
-
```
|
|
1248
|
-
|
|
1249
|
-
3. **Update documentation**
|
|
1250
|
-
- Add tool to README.md
|
|
1251
|
-
- Update tool count
|
|
1252
|
-
- Add usage example if applicable
|
|
1159
|
+
3. **Testing**: Add tests for new features
|
|
1253
1160
|
|
|
1254
1161
|
## 🔗 Links
|
|
1255
1162
|
|
|
1256
|
-
-
|
|
1257
|
-
-
|
|
1258
|
-
-
|
|
1259
|
-
-
|
|
1260
|
-
-
|
|
1261
|
-
-
|
|
1262
|
-
-
|
|
1163
|
+
- [GitLab Repository](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin)
|
|
1164
|
+
- [npm Package](https://www.npmjs.com/package/@gitlab/opencode-gitlab-plugin)
|
|
1165
|
+
- [Issue Tracker](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/issues)
|
|
1166
|
+
- [Merge Requests](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/merge_requests)
|
|
1167
|
+
- [Contributing Guide](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/blob/main/CONTRIBUTING.md)
|
|
1168
|
+
- [Changelog](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/blob/main/CHANGELOG.md)
|
|
1169
|
+
- [CI/CD Pipelines](https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/pipelines)
|
|
1170
|
+
- [GitLab API Documentation](https://docs.gitlab.com/ee/api/)
|
|
1171
|
+
- [OpenCode Plugin SDK](https://github.com/opencode-ai/plugin)
|
|
1263
1172
|
|
|
1264
1173
|
## 🙏 Acknowledgments
|
|
1265
1174
|
|
|
@@ -1271,10 +1180,13 @@ add a new GitLab API tool:
|
|
|
1271
1180
|
|
|
1272
1181
|
For questions, issues, or feature requests:
|
|
1273
1182
|
|
|
1274
|
-
1. **Check existing issues**: <https://gitlab.com/
|
|
1183
|
+
1. **Check existing issues**: <https://gitlab.com/gitlab-org/editor-extensions/opencode-gitlab-plugin/-/issues>
|
|
1275
1184
|
2. **Create new issue**: Use issue templates for bugs or features
|
|
1276
1185
|
3. **Discussions**: Use GitLab discussions for questions
|
|
1277
|
-
|
|
1186
|
+
|
|
1187
|
+
## 📄 License
|
|
1188
|
+
|
|
1189
|
+
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.
|
|
1278
1190
|
|
|
1279
1191
|
---
|
|
1280
1192
|
|
|
Binary file
|
package/package.json
CHANGED