From 4a21b76af8a367630201b3db513d607fa726db14 Mon Sep 17 00:00:00 2001 From: Romain Beuque <556072+rbeuque74@users.noreply.github.com> Date: Tue, 28 Apr 2020 16:20:39 +0200 Subject: [PATCH] subtask: new result should be formatted with underscores (#139) Signed-off-by: Romain Beuque --- pkg/plugins/builtin/subtask/README.md | 14 +++++++------- pkg/plugins/builtin/subtask/subtask.go | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/plugins/builtin/subtask/README.md b/pkg/plugins/builtin/subtask/README.md index 79dfb920..bea86517 100644 --- a/pkg/plugins/builtin/subtask/README.md +++ b/pkg/plugins/builtin/subtask/README.md @@ -39,10 +39,10 @@ None. ### Output -| Name | Description | -| ------------------- | ----------------------------------------- | -| `id` | The public identifier of the task | -| `state` | The state of the task | -| `result` | The result of the task | -| `resolverUsername` | The username of the resolver of the task | -| `requesterUsername` | The username ot the requester of the task | +| Name | Description | +| -------------------- | ----------------------------------------- | +| `id` | The public identifier of the task | +| `state` | The state of the task | +| `result` | The result of the task | +| `resolver_username` | The username of the resolver of the task | +| `requester_username` | The username ot the requester of the task | diff --git a/pkg/plugins/builtin/subtask/subtask.go b/pkg/plugins/builtin/subtask/subtask.go index 364f6bf1..ffea255c 100644 --- a/pkg/plugins/builtin/subtask/subtask.go +++ b/pkg/plugins/builtin/subtask/subtask.go @@ -142,10 +142,10 @@ func exec(stepName string, config interface{}, ctx interface{}) (interface{}, in stepError = fmt.Errorf("Task '%s' not done yet", t.PublicID) } return map[string]interface{}{ - "id": t.PublicID, - "state": t.State, - "result": t.Result, - "resolverUsername": t.ResolverUsername, - "requesterUsername": t.RequesterUsername, + "id": t.PublicID, + "state": t.State, + "result": t.Result, + "resolver_username": t.ResolverUsername, + "requester_username": t.RequesterUsername, }, nil, stepError }