You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feedback and GitMirror actions are the same and share most of
the code. Finish hooks are also similar, the only difference
is that we don't allow to return an error/noop, since they are
kind of "auxiliary" tasks we do to the migration and we don't
want to mask a migration error with a hook error. Also a hook
error shouldn't block migrations.
Change-Id: I5e2304936b8897e221572af153ef94879b060be2
<spanstyle="white-space: nowrap;">`--validate-starlark`</span> | *string* | Starlark should be validated prior to execution, but this might break legacy configs. Options are LOOSE, STRICT
Create a dynamic Skylark action. This should only be used by libraries developers. Actions are Starlark functions that receive a context, perform some side effect and return a result (success, error or noop).
596
+
597
+
`dynamic.action core.action(impl, params={})`
598
+
599
+
600
+
#### Parameters:
601
+
602
+
Parameter | Description
603
+
--------- | -----------
604
+
impl | `callable`<br><p>The Skylark function to call</p>
605
+
params | `dict`<br><p>The parameters to the function. Will be available under ctx.params</p>
606
+
588
607
<aid="core.copy"aria-hidden="true"></a>
589
608
### core.copy
590
609
@@ -1453,7 +1472,7 @@ console | Get an instance of the console to report errors or warnings
1453
1472
destination | An object representing the destination. Can be used to query or modify the destination state
1454
1473
feedback_name | The name of the Feedback migration calling this action.
1455
1474
origin | An object representing the origin. Can be used to query about the ref or modifying the origin state
1456
-
params | Parameters for the function if created with core.dynamic_feedback
1475
+
params | Parameters for the function if created with core.action
1457
1476
refs | A list containing string representations of the entities that triggered the event
errors |`sequence of string`<br><p>An optional list of errors</p>
1548
1595
type|`string`<br><p>The type of migration effect:<br><ul><li><b>'CREATED'</b>: A new review or change was created.</li><li><b>'UPDATED'</b>: An existing review or change was updated.</li><li><b>'NOOP'</b>: The change was a noop.</li><li><b>'INSUFFICIENT_APPROVALS'</b>: The effect couldn't happen because the change doesn't have enough approvals.</li><li><b>'ERROR'</b>: A user attributable error happened that prevented the destination from creating/updating the change. <li><b>'STARTED'</b>: The initial effect of a migration that depends on a previous one. This allows to have 'dependant' migrations defined by users.<br>An example of this: a workflow migrates code from a Gerrit review to a GitHub PR, and a feedback migration migrates the test results from a CIin GitHub back to the Gerrit change.<br>This effect would be created on the former one.</li></ul></p>
0 commit comments