Beispiel #1
0
        public async Task <IActionResult> GetRepositoryReadme(string repositoryName)
        {
            string readme;

            try
            {
                readme = await _githubService.GetRepositoryReadme(repositoryName);
            }
            catch (Exception e)
            {
                _logger.LogError(e, "Error retrieving contributor information for GitHub repository '{Repository}'",
                                 repositoryName);
                return(new StatusCodeResult(500));
            }

            return(Ok(new { Readme = readme }));
        }