use of com.thoughtworks.go.apiv1.pipelineoperations.representers.TriggerOptions in project gocd by gocd.
the class PipelineOperationsControllerV1Delegate method triggerOptions.
public String triggerOptions(Request request, Response response) throws IOException {
String pipelineName = request.params("pipeline_name");
EnvironmentVariablesConfig variables = goConfigService.variablesFor(pipelineName);
PipelineInstanceModel pipelineInstanceModel = pipelineHistoryService.latest(pipelineName, currentUsername());
TriggerOptions triggerOptions = new TriggerOptions(variables, pipelineInstanceModel);
return writerForTopLevelObject(request, response, writer -> TriggerWithOptionsViewRepresenter.toJSON(writer, triggerOptions));
}
Aggregations