opencode-magi 0.0.0-dev-20260728015925 → 0.0.0-dev-20260728023249
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/dist/tools/review/check.js +2 -0
- package/package.json +1 -1
- package/schema.json +45 -3
|
@@ -56,6 +56,8 @@ export function getConditionErrors(condition, metadata, files) {
|
|
|
56
56
|
: {};
|
|
57
57
|
if (!matchesValues(condition.authors, [metadata.user.login]))
|
|
58
58
|
errors.push(`Author does not match safety filter: ${metadata.user.login}.`);
|
|
59
|
+
if (!matchesValues(condition.roles, [metadata.author_association]))
|
|
60
|
+
errors.push(`Role does not match safety filter: ${metadata.author_association}.`);
|
|
59
61
|
if (!matchesPatterns(branches.base, [metadata.base.ref]))
|
|
60
62
|
errors.push(`Base branch does not match safety filter: ${metadata.base.ref}.`);
|
|
61
63
|
if (!matchesPatterns(branches.head, [metadata.head.ref]))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-magi",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260728023249",
|
|
4
4
|
"description": "Multi-agent PR review and merge orchestration plugin for OpenCode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
|
package/schema.json
CHANGED
|
@@ -192,6 +192,45 @@
|
|
|
192
192
|
"head": { "$ref": "#/$defs/safetyFilter" }
|
|
193
193
|
}
|
|
194
194
|
},
|
|
195
|
+
"roleFilter": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"additionalProperties": false,
|
|
198
|
+
"minProperties": 1,
|
|
199
|
+
"properties": {
|
|
200
|
+
"exclude": {
|
|
201
|
+
"type": "array",
|
|
202
|
+
"items": {
|
|
203
|
+
"type": "string",
|
|
204
|
+
"enum": [
|
|
205
|
+
"COLLABORATOR",
|
|
206
|
+
"CONTRIBUTOR",
|
|
207
|
+
"FIRST_TIME_CONTRIBUTOR",
|
|
208
|
+
"FIRST_TIMER",
|
|
209
|
+
"MANNEQUIN",
|
|
210
|
+
"MEMBER",
|
|
211
|
+
"NONE",
|
|
212
|
+
"OWNER"
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"include": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"items": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"enum": [
|
|
221
|
+
"COLLABORATOR",
|
|
222
|
+
"CONTRIBUTOR",
|
|
223
|
+
"FIRST_TIME_CONTRIBUTOR",
|
|
224
|
+
"FIRST_TIMER",
|
|
225
|
+
"MANNEQUIN",
|
|
226
|
+
"MEMBER",
|
|
227
|
+
"NONE",
|
|
228
|
+
"OWNER"
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
195
234
|
"safety": {
|
|
196
235
|
"type": "object",
|
|
197
236
|
"additionalProperties": false,
|
|
@@ -200,7 +239,8 @@
|
|
|
200
239
|
"branches": { "$ref": "#/$defs/safetyBranchFilter" },
|
|
201
240
|
"labels": { "$ref": "#/$defs/safetyFilter" },
|
|
202
241
|
"maxChangedFiles": { "type": "integer", "minimum": 0 },
|
|
203
|
-
"paths": { "$ref": "#/$defs/safetyFilter" }
|
|
242
|
+
"paths": { "$ref": "#/$defs/safetyFilter" },
|
|
243
|
+
"roles": { "$ref": "#/$defs/roleFilter" }
|
|
204
244
|
}
|
|
205
245
|
},
|
|
206
246
|
"conditions": {
|
|
@@ -224,7 +264,8 @@
|
|
|
224
264
|
"authors": { "$ref": "#/$defs/safetyFilter" },
|
|
225
265
|
"branches": { "$ref": "#/$defs/safetyBranchFilter" },
|
|
226
266
|
"labels": { "$ref": "#/$defs/safetyFilter" },
|
|
227
|
-
"paths": { "$ref": "#/$defs/safetyFilter" }
|
|
267
|
+
"paths": { "$ref": "#/$defs/safetyFilter" },
|
|
268
|
+
"roles": { "$ref": "#/$defs/roleFilter" }
|
|
228
269
|
}
|
|
229
270
|
},
|
|
230
271
|
"automationConditions": {
|
|
@@ -269,7 +310,8 @@
|
|
|
269
310
|
"branches": { "$ref": "#/$defs/safetyBranchFilter" },
|
|
270
311
|
"edited": { "type": "boolean" },
|
|
271
312
|
"labels": { "$ref": "#/$defs/safetyFilter" },
|
|
272
|
-
"paths": { "$ref": "#/$defs/safetyFilter" }
|
|
313
|
+
"paths": { "$ref": "#/$defs/safetyFilter" },
|
|
314
|
+
"roles": { "$ref": "#/$defs/roleFilter" }
|
|
273
315
|
}
|
|
274
316
|
},
|
|
275
317
|
"automation": {
|