Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/api/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions internal/server/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ import (
)

type actionInfo struct {
Label string `json:"label"`
Type string `json:"type"`
Label string `json:"label"`
Type string `json:"type"`
Target string `json:"target,omitempty"`
}

type workflowStateInfo struct {
Expand Down
5 changes: 3 additions & 2 deletions internal/server/strict_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,9 @@ func (s *server) GetTicket(ctx context.Context, request api.GetTicketRequestObje
if stateCfg, ok := wflow.StateByName(ticketState.CurrentState); ok {
for _, a := range stateCfg.Actions {
availableActions = append(availableActions, actionInfo{
Label: a.Label,
Type: string(a.Type),
Label: a.Label,
Type: string(a.Type),
Target: a.Target,
})
}
}
Expand Down
5 changes: 3 additions & 2 deletions internal/server/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ func toActionResponses(actions []actionInfo) []api.ActionInfo {
out := make([]api.ActionInfo, 0, len(actions))
for _, action := range actions {
out = append(out, api.ActionInfo{
Label: action.Label,
Type: action.Type,
Label: action.Label,
Type: action.Type,
Target: stringPtr(action.Target),
})
}

Expand Down
1 change: 1 addition & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ components:
properties:
label: { type: string }
type: { type: string }
target: { type: string }
WorkflowStateInfo:
type: object
required: [name]
Expand Down
Loading
Loading