public async Task <SpeechletResponse> HandleAsync() { if (string.IsNullOrWhiteSpace(_environmentName)) { return(SpeechletHelper.BuildPlainTextResponse("Build", "Build", "Sorry, I didn't understand what you were trying to build.")); } await _jenkinsClient.BuildWithParametersAsync(new BuildWithParametersRequest() { Name = $"{_environmentName}.Deploy" }).ConfigureAwait(false); return(SpeechletHelper.BuildPlainTextResponse("Build", "Build", $"Ok, I started the {_environmentName} build for you.")); }
// TODO: not sure what this is/doesn't seem useful for now. maybe move into a base class at some point just to get it out of the way. public override Task <SpeechletResponse> OnLaunchAsync(LaunchRequest launchRequest, Session session) { const string onLaunchName = "OnLaunch"; return(Task.FromResult(SpeechletHelper.BuildPlainTextResponse(GetType().Name, onLaunchName, onLaunchName))); }