Skip to content
This repository was archived by the owner on Aug 28, 2019. It is now read-only.

Commit d17111d

Browse files
committed
Regenerated library to pick up latest schema changes
1 parent 7bb6646 commit d17111d

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

codegenerator/model/model-data.txt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3733,11 +3733,9 @@ https://www.npmjs.com/package/cron-parser. For example:
37333733
* `['0 0 1 * * *']` -- daily at 1:00 UTC
37343734
* `['0 0 9,21 * * 1-5', '0 0 12 * * 0,6']` -- weekdays at 9:00 and 21:00 UTC, weekends at noon
37353735

3736-
Hooks can be parametrized using JSON-e. The task definition in the hook is used as a JSON-e template,
3737-
and the paramters are supplied as a JSON-e context. The result of rendeting the template and context is
3738-
used as the task definition. Currently context can only be provided with the triggerHook method.
3739-
You can find a complete description about how json-e works, here:
3740-
https://github.com/taskcluster/json-e'
3736+
The task definition is used as a JSON-e template, with a context depending on how it is fired. See
3737+
https://docs.taskcluster.net/reference/core/taskcluster-hooks/docs/firing-hooks
3738+
for more information.'
37413739
Base URL = 'https://hooks.taskcluster.net/v1'
37423740
Entry 0 =
37433741
Entry Type = 'function'
@@ -3869,7 +3867,11 @@ Entry 8 =
38693867
Entry Input = 'http://schemas.taskcluster.net/hooks/v1/trigger-context.json'
38703868
Entry Output = 'http://schemas.taskcluster.net/hooks/v1/task-status.json'
38713869
Entry Title = 'Trigger a hook'
3872-
Entry Description = 'This endpoint will trigger the creation of a task from a hook definition.'
3870+
Entry Description = 'This endpoint will trigger the creation of a task from a hook definition.
3871+
3872+
The HTTP payload must match the hooks `triggerSchema`. If it does, it is
3873+
provided as the `payload` property of the JSON-e context used to render the
3874+
task template.'
38733875
Entry 9 =
38743876
Entry Type = 'function'
38753877
Entry Method = 'get'
@@ -3910,7 +3912,11 @@ Entry 11 =
39103912
Entry Input = 'http://schemas.taskcluster.net/hooks/v1/trigger-context.json'
39113913
Entry Output = 'http://schemas.taskcluster.net/hooks/v1/task-status.json'
39123914
Entry Title = 'Trigger a hook with a token'
3913-
Entry Description = 'This endpoint triggers a defined hook with a valid token.'
3915+
Entry Description = 'This endpoint triggers a defined hook with a valid token.
3916+
3917+
The HTTP payload must match the hooks `triggerSchema`. If it does, it is
3918+
provided as the `payload` property of the JSON-e context used to render the
3919+
task template.'
39143920
Entry 12 =
39153921
Entry Type = 'function'
39163922
Entry Method = 'get'

src/main/java/org/mozilla/taskcluster/client/hooks/Hooks.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@
2727
* * `['0 0 1 * * *']` -- daily at 1:00 UTC
2828
* * `['0 0 9,21 * * 1-5', '0 0 12 * * 0,6']` -- weekdays at 9:00 and 21:00 UTC, weekends at noon
2929
*
30-
* Hooks can be parametrized using JSON-e. The task definition in the hook is used as a JSON-e template,
31-
* and the paramters are supplied as a JSON-e context. The result of rendeting the template and context is
32-
* used as the task definition. Currently context can only be provided with the triggerHook method.
33-
* You can find a complete description about how json-e works, here:
34-
* https://github.com/taskcluster/json-e
30+
* The task definition is used as a JSON-e template, with a context depending on how it is fired. See
31+
* https://docs.taskcluster.net/reference/core/taskcluster-hooks/docs/firing-hooks
32+
* for more information.
3533
*
3634
* @see "[Hooks API Documentation](https://docs.taskcluster.net/reference/core/hooks/api-docs)"
3735
*/
@@ -159,6 +157,10 @@ public CallSummary<EmptyPayload, EmptyPayload> removeHook(String hookGroupId, St
159157

160158
/**
161159
* This endpoint will trigger the creation of a task from a hook definition.
160+
*
161+
* The HTTP payload must match the hooks `triggerSchema`. If it does, it is
162+
* provided as the `payload` property of the JSON-e context used to render the
163+
* task template.
162164
163165
* Required scopes:
164166
* hooks:trigger-hook:<hookGroupId>/<hookId>
@@ -197,6 +199,10 @@ public CallSummary<EmptyPayload, TriggerTokenResponse> resetTriggerToken(String
197199

198200
/**
199201
* This endpoint triggers a defined hook with a valid token.
202+
*
203+
* The HTTP payload must match the hooks `triggerSchema`. If it does, it is
204+
* provided as the `payload` property of the JSON-e context used to render the
205+
* task template.
200206
*
201207
* @see "[Trigger a hook with a token API Documentation](https://docs.taskcluster.net/reference/core/hooks/api-docs#triggerHookWithToken)"
202208
*/

0 commit comments

Comments
 (0)