@almadar/std 14.8.0 → 14.9.0

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.
Files changed (57) hide show
  1. package/behaviors/registry/app/organisms/std-api-gateway.orb +1167 -4114
  2. package/behaviors/registry/app/organisms/std-booking-system.orb +2627 -4281
  3. package/behaviors/registry/app/organisms/std-cicd-pipeline.orb +1313 -3724
  4. package/behaviors/registry/app/organisms/std-cms.orb +1658 -4903
  5. package/behaviors/registry/app/organisms/std-coding-academy.orb +686 -1238
  6. package/behaviors/registry/app/organisms/std-crm.orb +1778 -5995
  7. package/behaviors/registry/app/organisms/std-devops-dashboard.orb +1918 -5539
  8. package/behaviors/registry/app/organisms/std-finance-tracker.orb +1064 -3721
  9. package/behaviors/registry/app/organisms/std-healthcare.orb +2810 -7215
  10. package/behaviors/registry/app/organisms/std-helpdesk.orb +1065 -4161
  11. package/behaviors/registry/app/organisms/std-hr-portal.orb +2300 -6322
  12. package/behaviors/registry/app/organisms/std-iot-dashboard.orb +1582 -3721
  13. package/behaviors/registry/app/organisms/std-lms.orb +1885 -3952
  14. package/behaviors/registry/app/organisms/std-project-manager.orb +1226 -5123
  15. package/behaviors/registry/app/organisms/std-realtime-chat.orb +1147 -3794
  16. package/behaviors/registry/app/organisms/std-social-feed.orb +1044 -1728
  17. package/behaviors/registry/app/organisms/std-trading-dashboard.orb +1208 -3186
  18. package/behaviors/registry/core/atoms/std-graphs.orb +40 -41
  19. package/behaviors/registry/core/atoms/std-stats.orb +131 -110
  20. package/behaviors/registry/service/atoms/std-service-custom-bearer.orb +351 -345
  21. package/behaviors/registry/service/atoms/std-service-email.orb +334 -328
  22. package/behaviors/registry/service/atoms/std-service-github.orb +308 -365
  23. package/behaviors/registry/service/atoms/std-service-llm.orb +329 -437
  24. package/behaviors/registry/service/atoms/std-service-oauth.orb +261 -564
  25. package/behaviors/registry/service/atoms/std-service-redis.orb +299 -405
  26. package/behaviors/registry/service/atoms/std-service-storage.orb +293 -505
  27. package/behaviors/registry/service/atoms/std-service-twilio.orb +315 -393
  28. package/behaviors/registry/service/atoms/std-service-youtube.orb +266 -547
  29. package/dist/behaviors/registry/app/organisms/std-api-gateway.orb +1167 -4114
  30. package/dist/behaviors/registry/app/organisms/std-booking-system.orb +2627 -4281
  31. package/dist/behaviors/registry/app/organisms/std-cicd-pipeline.orb +1313 -3724
  32. package/dist/behaviors/registry/app/organisms/std-cms.orb +1658 -4903
  33. package/dist/behaviors/registry/app/organisms/std-coding-academy.orb +686 -1238
  34. package/dist/behaviors/registry/app/organisms/std-crm.orb +1778 -5995
  35. package/dist/behaviors/registry/app/organisms/std-devops-dashboard.orb +1918 -5539
  36. package/dist/behaviors/registry/app/organisms/std-finance-tracker.orb +1064 -3721
  37. package/dist/behaviors/registry/app/organisms/std-healthcare.orb +2810 -7215
  38. package/dist/behaviors/registry/app/organisms/std-helpdesk.orb +1065 -4161
  39. package/dist/behaviors/registry/app/organisms/std-hr-portal.orb +2300 -6322
  40. package/dist/behaviors/registry/app/organisms/std-iot-dashboard.orb +1582 -3721
  41. package/dist/behaviors/registry/app/organisms/std-lms.orb +1885 -3952
  42. package/dist/behaviors/registry/app/organisms/std-project-manager.orb +1226 -5123
  43. package/dist/behaviors/registry/app/organisms/std-realtime-chat.orb +1147 -3794
  44. package/dist/behaviors/registry/app/organisms/std-social-feed.orb +1044 -1728
  45. package/dist/behaviors/registry/app/organisms/std-trading-dashboard.orb +1208 -3186
  46. package/dist/behaviors/registry/core/atoms/std-graphs.orb +40 -41
  47. package/dist/behaviors/registry/core/atoms/std-stats.orb +131 -110
  48. package/dist/behaviors/registry/service/atoms/std-service-custom-bearer.orb +351 -345
  49. package/dist/behaviors/registry/service/atoms/std-service-email.orb +334 -328
  50. package/dist/behaviors/registry/service/atoms/std-service-github.orb +308 -365
  51. package/dist/behaviors/registry/service/atoms/std-service-llm.orb +329 -437
  52. package/dist/behaviors/registry/service/atoms/std-service-oauth.orb +261 -564
  53. package/dist/behaviors/registry/service/atoms/std-service-redis.orb +299 -405
  54. package/dist/behaviors/registry/service/atoms/std-service-storage.orb +293 -505
  55. package/dist/behaviors/registry/service/atoms/std-service-twilio.orb +315 -393
  56. package/dist/behaviors/registry/service/atoms/std-service-youtube.orb +266 -547
  57. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "std-service-github",
3
- "version": "1.0.0",
4
- "description": "std-service-github as a Function",
3
+ "version": "2.0.0",
4
+ "description": "std-service-github GitHub service. Bind via `uses Github from \"std/behaviors/std-service-github\"` and configure `owner` / `repo` / `path` / `ref` / `op` at the call site. Pass `uiTrait: \"@trait.YourGithubForm\"` to inject your own form; leave unset to render the atom's default form (standalone surface).",
5
5
  "orbitals": [
6
6
  {
7
7
  "name": "ServiceGithubOrbital",
@@ -15,34 +15,29 @@
15
15
  "required": true
16
16
  },
17
17
  {
18
- "name": "title",
18
+ "name": "owner",
19
19
  "type": "string",
20
20
  "default": ""
21
21
  },
22
22
  {
23
- "name": "body",
23
+ "name": "repo",
24
24
  "type": "string",
25
25
  "default": ""
26
26
  },
27
27
  {
28
- "name": "head",
28
+ "name": "path",
29
29
  "type": "string",
30
30
  "default": ""
31
31
  },
32
32
  {
33
- "name": "base",
33
+ "name": "ref",
34
34
  "type": "string",
35
35
  "default": "main"
36
36
  },
37
37
  {
38
- "name": "prUrl",
39
- "type": "string",
40
- "default": ""
41
- },
42
- {
43
- "name": "prNumber",
44
- "type": "number",
45
- "default": 0.0
38
+ "name": "result",
39
+ "type": "object",
40
+ "default": {}
46
41
  },
47
42
  {
48
43
  "name": "ghStatus",
@@ -79,6 +74,129 @@
79
74
  ]
80
75
  },
81
76
  "traits": [
77
+ {
78
+ "name": "ServiceGithubDefaultForm",
79
+ "category": "interaction",
80
+ "emits": [
81
+ {
82
+ "event": "RUN",
83
+ "scope": "external",
84
+ "payloadSchema": [
85
+ {
86
+ "name": "source",
87
+ "type": "string"
88
+ }
89
+ ]
90
+ }
91
+ ],
92
+ "stateMachine": {
93
+ "states": [
94
+ {
95
+ "name": "ready",
96
+ "isInitial": true
97
+ }
98
+ ],
99
+ "events": [
100
+ {
101
+ "key": "INIT",
102
+ "name": "Initialize"
103
+ },
104
+ {
105
+ "key": "RUN",
106
+ "name": "Run"
107
+ }
108
+ ],
109
+ "transitions": [
110
+ {
111
+ "from": "ready",
112
+ "to": "ready",
113
+ "event": "INIT",
114
+ "effects": [
115
+ [
116
+ "render-ui",
117
+ "main",
118
+ {
119
+ "direction": "vertical",
120
+ "gap": "lg",
121
+ "align": "center",
122
+ "type": "stack",
123
+ "children": [
124
+ {
125
+ "type": "stack",
126
+ "children": [
127
+ {
128
+ "type": "icon",
129
+ "name": "github"
130
+ },
131
+ {
132
+ "type": "typography",
133
+ "content": "GitHub",
134
+ "variant": "h2"
135
+ }
136
+ ],
137
+ "align": "center",
138
+ "direction": "horizontal",
139
+ "gap": "md"
140
+ },
141
+ {
142
+ "type": "divider"
143
+ },
144
+ {
145
+ "direction": "vertical",
146
+ "gap": "md",
147
+ "children": [
148
+ {
149
+ "type": "select",
150
+ "options": [
151
+ {
152
+ "label": "Get File",
153
+ "value": "getFile"
154
+ },
155
+ {
156
+ "label": "List Commits",
157
+ "value": "listCommits"
158
+ },
159
+ {
160
+ "value": "createIssue",
161
+ "label": "Create Issue"
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "placeholder": "owner",
167
+ "type": "input"
168
+ },
169
+ {
170
+ "placeholder": "repo",
171
+ "type": "input"
172
+ },
173
+ {
174
+ "placeholder": "path",
175
+ "type": "input"
176
+ },
177
+ {
178
+ "placeholder": "ref (default: main)",
179
+ "type": "input"
180
+ }
181
+ ],
182
+ "type": "stack"
183
+ },
184
+ {
185
+ "label": "Run",
186
+ "variant": "primary",
187
+ "type": "button",
188
+ "icon": "play",
189
+ "action": "RUN"
190
+ }
191
+ ]
192
+ }
193
+ ]
194
+ ]
195
+ }
196
+ ]
197
+ },
198
+ "scope": "instance"
199
+ },
82
200
  {
83
201
  "name": "ServiceGithubGithub",
84
202
  "category": "interaction",
@@ -105,9 +223,13 @@
105
223
  ]
106
224
  },
107
225
  {
108
- "event": "ServiceGithubGithubCompleted",
226
+ "event": "GithubDone",
109
227
  "scope": "external",
110
228
  "payloadSchema": [
229
+ {
230
+ "name": "id",
231
+ "type": "string"
232
+ },
111
233
  {
112
234
  "name": "result",
113
235
  "type": "object"
@@ -127,6 +249,26 @@
127
249
  "type": "string"
128
250
  }
129
251
  ]
252
+ },
253
+ {
254
+ "event": "FAILED",
255
+ "payloadSchema": [
256
+ {
257
+ "name": "error",
258
+ "type": "string",
259
+ "required": true
260
+ }
261
+ ]
262
+ }
263
+ ],
264
+ "listens": [
265
+ {
266
+ "event": "RUN",
267
+ "triggers": "RUN",
268
+ "source": {
269
+ "kind": "trait",
270
+ "trait": "ServiceGithubDefaultForm"
271
+ }
130
272
  }
131
273
  ],
132
274
  "stateMachine": {
@@ -136,10 +278,10 @@
136
278
  "isInitial": true
137
279
  },
138
280
  {
139
- "name": "creatingPR"
281
+ "name": "running"
140
282
  },
141
283
  {
142
- "name": "prCreated"
284
+ "name": "succeeded"
143
285
  },
144
286
  {
145
287
  "name": "error"
@@ -151,122 +293,57 @@
151
293
  "name": "Initialize"
152
294
  },
153
295
  {
154
- "key": "CREATE_PR",
155
- "name": "Create Pr"
296
+ "key": "RUN",
297
+ "name": "Run"
156
298
  },
157
299
  {
158
- "key": "PR_CREATED",
159
- "name": "Pr Created",
300
+ "key": "ServiceGithubLoaded",
301
+ "name": "ServiceGithub loaded",
160
302
  "payloadSchema": [
161
303
  {
162
- "name": "url",
163
- "type": "string",
164
- "required": true
165
- },
166
- {
167
- "name": "number",
168
- "type": "number",
169
- "required": true
304
+ "name": "id",
305
+ "type": "string"
170
306
  }
171
307
  ]
172
308
  },
173
309
  {
174
- "key": "FAILED",
175
- "name": "Failed",
310
+ "key": "ServiceGithubLoadFailed",
311
+ "name": "ServiceGithub load failed",
176
312
  "payloadSchema": [
177
313
  {
178
- "name": "error",
179
- "type": "string",
180
- "required": true
314
+ "name": "message",
315
+ "type": "string"
181
316
  }
182
317
  ]
183
318
  },
184
319
  {
185
- "key": "RESET",
186
- "name": "Reset"
187
- },
188
- {
189
- "key": "RETRY",
190
- "name": "Retry"
191
- },
192
- {
193
- "key": "ServiceGithubLoaded",
194
- "name": "ServiceGithub loaded",
320
+ "key": "GithubDone",
321
+ "name": "Github done",
195
322
  "payloadSchema": [
196
323
  {
197
324
  "name": "id",
198
- "type": "string",
199
- "required": true
200
- },
201
- {
202
- "name": "title",
203
- "type": "string"
204
- },
205
- {
206
- "name": "body",
207
- "type": "string"
208
- },
209
- {
210
- "name": "head",
211
325
  "type": "string"
212
326
  },
213
327
  {
214
- "name": "base",
215
- "type": "string"
216
- },
217
- {
218
- "name": "prUrl",
219
- "type": "string"
220
- },
221
- {
222
- "name": "prNumber",
223
- "type": "number"
224
- },
225
- {
226
- "name": "ghStatus",
227
- "type": "string"
228
- },
229
- {
230
- "name": "error",
231
- "type": "string"
232
- },
233
- {
234
- "name": "name",
235
- "type": "string"
236
- },
237
- {
238
- "name": "description",
239
- "type": "string"
240
- },
241
- {
242
- "name": "status",
243
- "type": "string"
244
- },
245
- {
246
- "name": "createdAt",
247
- "type": "string"
328
+ "name": "result",
329
+ "type": "object"
248
330
  }
249
331
  ]
250
332
  },
251
333
  {
252
- "key": "ServiceGithubLoadFailed",
253
- "name": "ServiceGithub load failed",
334
+ "key": "FAILED",
335
+ "name": "Failed",
254
336
  "payloadSchema": [
255
337
  {
256
- "name": "message",
257
- "type": "string"
338
+ "name": "error",
339
+ "type": "string",
340
+ "required": true
258
341
  }
259
342
  ]
260
343
  },
261
344
  {
262
- "key": "ServiceGithubGithubCompleted",
263
- "name": "ServiceGithub github completed",
264
- "payloadSchema": [
265
- {
266
- "name": "result",
267
- "type": "object"
268
- }
269
- ]
345
+ "key": "RESET",
346
+ "name": "Reset"
270
347
  },
271
348
  {
272
349
  "key": "ServiceGithubGithubFailed",
@@ -281,6 +358,10 @@
281
358
  "type": "string"
282
359
  }
283
360
  ]
361
+ },
362
+ {
363
+ "key": "RETRY",
364
+ "name": "Retry"
284
365
  }
285
366
  ],
286
367
  "transitions": [
@@ -291,31 +372,31 @@
291
372
  "effects": [
292
373
  [
293
374
  "set",
294
- "@entity.base",
295
- "main"
375
+ "@entity.owner",
376
+ "@config.owner"
296
377
  ],
297
378
  [
298
379
  "set",
299
- "@entity.body",
300
- ""
380
+ "@entity.repo",
381
+ "@config.repo"
301
382
  ],
302
383
  [
303
384
  "set",
304
- "@entity.head",
305
- ""
385
+ "@entity.path",
386
+ "@config.path"
306
387
  ],
307
388
  [
308
389
  "set",
309
- "@entity.title",
310
- ""
390
+ "@entity.ref",
391
+ "@config.ref"
311
392
  ],
312
393
  [
313
394
  "fetch",
314
395
  "ServiceGithub",
315
396
  {
316
397
  "emit": {
317
- "failure": "ServiceGithubLoadFailed",
318
- "success": "ServiceGithubLoaded"
398
+ "success": "ServiceGithubLoaded",
399
+ "failure": "ServiceGithubLoadFailed"
319
400
  }
320
401
  }
321
402
  ],
@@ -324,148 +405,111 @@
324
405
  "main",
325
406
  {
326
407
  "type": "stack",
327
- "children": [
328
- {
329
- "align": "center",
330
- "children": [
331
- {
332
- "name": "git-pull-request",
333
- "type": "icon"
334
- },
335
- {
336
- "content": "Create Pull Request",
337
- "type": "typography",
338
- "variant": "h2"
339
- }
340
- ],
341
- "type": "stack",
342
- "direction": "horizontal",
343
- "gap": "md"
344
- },
345
- {
346
- "type": "divider"
347
- },
348
- {
349
- "direction": "vertical",
350
- "children": [
351
- {
352
- "type": "input",
353
- "placeholder": "PR title"
354
- },
355
- {
356
- "type": "textarea",
357
- "placeholder": "Describe your changes..."
358
- },
359
- {
360
- "type": "input",
361
- "placeholder": "feature-branch"
362
- },
363
- {
364
- "placeholder": "main",
365
- "type": "input"
366
- }
367
- ],
368
- "type": "stack",
369
- "gap": "md"
370
- },
371
- {
372
- "label": "Create PR",
373
- "type": "button",
374
- "action": "CREATE_PR",
375
- "variant": "primary",
376
- "icon": "git-pull-request"
377
- }
378
- ],
379
408
  "direction": "vertical",
380
- "gap": "lg",
381
- "align": "center"
409
+ "gap": "md",
410
+ "children": [
411
+ "@config.uiTrait"
412
+ ]
382
413
  }
383
414
  ]
384
415
  ]
385
416
  },
386
417
  {
387
418
  "from": "idle",
388
- "to": "creatingPR",
389
- "event": "CREATE_PR",
419
+ "to": "running",
420
+ "event": "RUN",
390
421
  "effects": [
391
422
  [
392
423
  "render-ui",
393
424
  "main",
394
425
  {
395
- "message": "Submitting your PR to GitHub.",
396
- "type": "loading-state",
397
- "title": "Creating pull request..."
426
+ "message": "Calling the GitHub service.",
427
+ "title": "Running GitHub operation...",
428
+ "type": "loading-state"
398
429
  }
399
430
  ],
400
431
  [
401
432
  "call-service",
402
433
  "github",
403
- "createPR",
434
+ "@config.op",
404
435
  {
405
- "title": "@entity.title",
406
- "head": "@entity.head",
407
- "base": "@entity.base",
408
- "body": "@entity.body"
436
+ "ref": "@config.ref",
437
+ "repo": "@config.repo",
438
+ "path": "@config.path",
439
+ "owner": "@config.owner"
409
440
  },
410
441
  {
411
442
  "emit": {
412
- "failure": "ServiceGithubGithubFailed",
413
- "success": "ServiceGithubGithubCompleted"
443
+ "failure": "FAILED",
444
+ "success": "GithubDone"
414
445
  }
415
446
  }
416
447
  ]
417
448
  ]
418
449
  },
419
450
  {
420
- "from": "creatingPR",
421
- "to": "prCreated",
422
- "event": "PR_CREATED",
451
+ "from": "idle",
452
+ "to": "idle",
453
+ "event": "ServiceGithubLoaded"
454
+ },
455
+ {
456
+ "from": "idle",
457
+ "to": "idle",
458
+ "event": "ServiceGithubLoadFailed"
459
+ },
460
+ {
461
+ "from": "running",
462
+ "to": "succeeded",
463
+ "event": "GithubDone",
423
464
  "effects": [
424
465
  [
425
466
  "set",
426
- "@entity.prUrl",
427
- "@payload.url"
467
+ "@entity.result",
468
+ "@payload.result"
428
469
  ],
429
470
  [
430
471
  "set",
431
- "@entity.prNumber",
432
- "@payload.number"
472
+ "@entity.ghStatus",
473
+ "succeeded"
433
474
  ],
434
475
  [
435
- "set",
436
- "@entity.ghStatus",
437
- "created"
476
+ "emit",
477
+ "GithubDone",
478
+ {
479
+ "id": "@entity.id",
480
+ "result": "@payload.result"
481
+ }
438
482
  ],
439
483
  [
440
484
  "render-ui",
441
485
  "main",
442
486
  {
443
- "direction": "vertical",
444
487
  "gap": "lg",
488
+ "direction": "vertical",
445
489
  "type": "stack",
446
490
  "align": "center",
447
491
  "children": [
448
492
  {
449
- "type": "icon",
450
- "name": "check-circle"
493
+ "name": "check-circle",
494
+ "type": "icon"
451
495
  },
452
496
  {
453
497
  "type": "alert",
454
498
  "variant": "success",
455
- "message": "Pull request created!"
499
+ "message": "GitHub operation completed!"
456
500
  },
457
501
  {
458
502
  "color": "muted",
459
- "content": "@entity.prUrl",
460
- "type": "typography",
461
- "variant": "body"
503
+ "content": "@entity.id",
504
+ "variant": "body",
505
+ "type": "typography"
462
506
  },
463
507
  {
464
- "type": "button",
465
- "action": "RESET",
508
+ "variant": "ghost",
466
509
  "icon": "rotate-ccw",
467
- "label": "Create Another",
468
- "variant": "ghost"
510
+ "label": "Run Again",
511
+ "action": "RESET",
512
+ "type": "button"
469
513
  }
470
514
  ]
471
515
  }
@@ -473,7 +517,7 @@
473
517
  ]
474
518
  },
475
519
  {
476
- "from": "creatingPR",
520
+ "from": "running",
477
521
  "to": "error",
478
522
  "event": "FAILED",
479
523
  "effects": [
@@ -482,20 +526,28 @@
482
526
  "@entity.error",
483
527
  "@payload.error"
484
528
  ],
529
+ [
530
+ "emit",
531
+ "ServiceGithubGithubFailed",
532
+ {
533
+ "error": "@entity.error",
534
+ "code": "github_op_failed"
535
+ }
536
+ ],
485
537
  [
486
538
  "render-ui",
487
539
  "main",
488
540
  {
489
- "title": "PR Creation Failed",
490
- "onRetry": "RETRY",
491
541
  "type": "error-state",
492
- "message": "@entity.error"
542
+ "message": "@entity.error",
543
+ "onRetry": "RETRY",
544
+ "title": "GitHub Operation Failed"
493
545
  }
494
546
  ]
495
547
  ]
496
548
  },
497
549
  {
498
- "from": "prCreated",
550
+ "from": "succeeded",
499
551
  "to": "idle",
500
552
  "event": "RESET",
501
553
  "effects": [
@@ -503,66 +555,26 @@
503
555
  "render-ui",
504
556
  "main",
505
557
  {
506
- "gap": "lg",
507
- "children": [
508
- {
509
- "children": [
510
- {
511
- "name": "git-pull-request",
512
- "type": "icon"
513
- },
514
- {
515
- "variant": "h2",
516
- "type": "typography",
517
- "content": "Create Pull Request"
518
- }
519
- ],
520
- "direction": "horizontal",
521
- "gap": "md",
522
- "align": "center",
523
- "type": "stack"
524
- },
525
- {
526
- "type": "divider"
527
- },
528
- {
529
- "children": [
530
- {
531
- "type": "input",
532
- "placeholder": "PR title"
533
- },
534
- {
535
- "type": "textarea",
536
- "placeholder": "Describe your changes..."
537
- },
538
- {
539
- "type": "input",
540
- "placeholder": "feature-branch"
541
- },
542
- {
543
- "type": "input",
544
- "placeholder": "main"
545
- }
546
- ],
547
- "gap": "md",
548
- "direction": "vertical",
549
- "type": "stack"
550
- },
551
- {
552
- "label": "Create PR",
553
- "variant": "primary",
554
- "icon": "git-pull-request",
555
- "type": "button",
556
- "action": "CREATE_PR"
557
- }
558
- ],
559
558
  "direction": "vertical",
560
559
  "type": "stack",
561
- "align": "center"
560
+ "children": [
561
+ "@config.uiTrait"
562
+ ],
563
+ "gap": "md"
562
564
  }
563
565
  ]
564
566
  ]
565
567
  },
568
+ {
569
+ "from": "succeeded",
570
+ "to": "succeeded",
571
+ "event": "GithubDone"
572
+ },
573
+ {
574
+ "from": "error",
575
+ "to": "error",
576
+ "event": "ServiceGithubGithubFailed"
577
+ },
566
578
  {
567
579
  "from": "error",
568
580
  "to": "idle",
@@ -572,62 +584,12 @@
572
584
  "render-ui",
573
585
  "main",
574
586
  {
575
- "gap": "lg",
576
- "type": "stack",
577
587
  "children": [
578
- {
579
- "type": "stack",
580
- "direction": "horizontal",
581
- "align": "center",
582
- "children": [
583
- {
584
- "name": "git-pull-request",
585
- "type": "icon"
586
- },
587
- {
588
- "variant": "h2",
589
- "type": "typography",
590
- "content": "Create Pull Request"
591
- }
592
- ],
593
- "gap": "md"
594
- },
595
- {
596
- "type": "divider"
597
- },
598
- {
599
- "type": "stack",
600
- "direction": "vertical",
601
- "gap": "md",
602
- "children": [
603
- {
604
- "placeholder": "PR title",
605
- "type": "input"
606
- },
607
- {
608
- "type": "textarea",
609
- "placeholder": "Describe your changes..."
610
- },
611
- {
612
- "type": "input",
613
- "placeholder": "feature-branch"
614
- },
615
- {
616
- "type": "input",
617
- "placeholder": "main"
618
- }
619
- ]
620
- },
621
- {
622
- "action": "CREATE_PR",
623
- "variant": "primary",
624
- "label": "Create PR",
625
- "type": "button",
626
- "icon": "git-pull-request"
627
- }
588
+ "@config.uiTrait"
628
589
  ],
590
+ "type": "stack",
629
591
  "direction": "vertical",
630
- "align": "center"
592
+ "gap": "md"
631
593
  }
632
594
  ]
633
595
  ]
@@ -641,68 +603,49 @@
641
603
  "render-ui",
642
604
  "main",
643
605
  {
606
+ "direction": "vertical",
644
607
  "children": [
645
- {
646
- "children": [
647
- {
648
- "type": "icon",
649
- "name": "git-pull-request"
650
- },
651
- {
652
- "content": "Create Pull Request",
653
- "type": "typography",
654
- "variant": "h2"
655
- }
656
- ],
657
- "gap": "md",
658
- "direction": "horizontal",
659
- "type": "stack",
660
- "align": "center"
661
- },
662
- {
663
- "type": "divider"
664
- },
665
- {
666
- "type": "stack",
667
- "gap": "md",
668
- "direction": "vertical",
669
- "children": [
670
- {
671
- "type": "input",
672
- "placeholder": "PR title"
673
- },
674
- {
675
- "placeholder": "Describe your changes...",
676
- "type": "textarea"
677
- },
678
- {
679
- "type": "input",
680
- "placeholder": "feature-branch"
681
- },
682
- {
683
- "type": "input",
684
- "placeholder": "main"
685
- }
686
- ]
687
- },
688
- {
689
- "label": "Create PR",
690
- "variant": "primary",
691
- "icon": "git-pull-request",
692
- "action": "CREATE_PR",
693
- "type": "button"
694
- }
608
+ "@config.uiTrait"
695
609
  ],
696
- "gap": "lg",
697
610
  "type": "stack",
698
- "direction": "vertical",
699
- "align": "center"
611
+ "gap": "md"
700
612
  }
701
613
  ]
702
614
  ]
703
615
  }
704
616
  ]
705
617
  },
618
+ "config": {
619
+ "path": {
620
+ "type": "string",
621
+ "default": ""
622
+ },
623
+ "ref": {
624
+ "type": "string",
625
+ "default": "main"
626
+ },
627
+ "op": {
628
+ "type": "string",
629
+ "default": "getFile",
630
+ "values": [
631
+ "getFile",
632
+ "listCommits",
633
+ "createIssue"
634
+ ]
635
+ },
636
+ "uiTrait": {
637
+ "type": "trait",
638
+ "default": "@trait.ServiceGithubDefaultForm"
639
+ },
640
+ "owner": {
641
+ "type": "string",
642
+ "default": ""
643
+ },
644
+ "repo": {
645
+ "type": "string",
646
+ "default": ""
647
+ }
648
+ },
706
649
  "scope": "instance"
707
650
  }
708
651
  ],