/// <inheritdoc/> public void AbortMerge(string org, string repository) { try { _decoratedService.AbortMerge(org, repository); } catch (Exception ex) { LogError(ex, "AbortMerge", org, repository); throw; } }
public ActionResult AbortMerge(string org, string repository) { try { if (string.IsNullOrEmpty(org) || string.IsNullOrEmpty(repository)) { return(ValidationProblem("One or all of the input parameters are null")); } _sourceControl.AbortMerge(org, repository); return(Ok()); } catch (Exception) { return(StatusCode(StatusCodes.Status500InternalServerError)); } }
public ActionResult <HttpResponseMessage> AbortMerge(string owner, string repository) { try { if (string.IsNullOrEmpty(owner) || string.IsNullOrEmpty(repository)) { HttpResponseMessage badRequest = new HttpResponseMessage(HttpStatusCode.BadRequest); badRequest.ReasonPhrase = "One or all of the input parameters are null"; return(badRequest); } _sourceControl.AbortMerge(owner, repository); return(new HttpResponseMessage(HttpStatusCode.OK)); } catch (Exception ex) { return(new HttpResponseMessage(HttpStatusCode.InternalServerError)); } }