Ejemplo n.º 1
0
        public ReleaseViewModel(
			GitHubRepository gitHubRepository,
			Release release)
        {
            GitHubRepository = gitHubRepository;
            Release = release;
        }
Ejemplo n.º 2
0
        private async Task<ReleasesResponse> GetAllReleases(GitHubRepository gitHubRepository, int page)
        {
            try
            {
                var releases = new List<ReleaseViewModel>();
                var gitHubReleases = await gitHub.GetReleases(gitHubRepository.Owner, gitHubRepository.Name, page);

                return gitHubReleases;
            }
            catch (Exception ex)
            {
                logger.LogError($"github request failed for {gitHubRepository.Name}", ex);
                return null;;
            }
        }
Ejemplo n.º 3
0
 private async Task<ReleaseViewModel> GetLatestRelease(GitHubRepository gitHubRepository)
 {
     try
     {
         var release = await gitHub.GetLatestRelease(gitHubRepository.Owner, gitHubRepository.Name);
         return new ReleaseViewModel(gitHubRepository, release);
     }
     catch (Exception ex)
     {
         logger.LogError($"github request failed for {gitHubRepository.Name}", ex);
         return new ReleaseViewModel(gitHubRepository, null);
     }
 }
Ejemplo n.º 4
0
        public ShowViewModel(GitHubRepository currentRepository)
        {
            Releases = new List<ReleaseViewModel>();

            CurrentRepository = currentRepository;
        }