Exemple #1
0
        public async Task <bool> Request(long repositoryId, CheckSuiteTriggerRequest request)
        {
            Ensure.ArgumentNotNull(request, nameof(request));

            var httpStatusCode = await Connection.Post(ApiUrls.CheckSuiteRequests(repositoryId), request, AcceptHeaders.ChecksApiPreview).ConfigureAwait(false);

            if (httpStatusCode != HttpStatusCode.Created)
            {
                throw new ApiException("Invalid Status Code returned. Expected a 201", httpStatusCode);
            }

            return(httpStatusCode == HttpStatusCode.Created);
        }