public async Task <IEnumerable <Comment> > GetPullRequestComments(string repositoryName, string ownerName, long id)
        {
            var url     = ApiUrls.PullRequestCommentsV1(ownerName, repositoryName, id);
            var request = new YouTrackRestRequest(url, Method.GET);

            return((await _versionOneClient.ExecuteTaskAsync <List <CommentV1> >(request)).Data.MapTo <List <Comment> >());
        }
        public async Task <IEnumerable <Repository> > GetUserRepositoriesV1()
        {
            var repositories = new List <Repository>();
            var url          = ApiUrls.RepositoriesV1();
            var request      = new YouTrackRestRequest(url, Method.GET);
            var response     = await _versionOneClient.ExecuteTaskAsync <List <RepositoryV1> >(request);

            if (response.Data != null)
            {
                foreach (var repositoryV1 in response.Data)
                {
                    var repo = repositoryV1.MapTo <Repository>();
                    repo.Links = new Links
                    {
                        Clone =
                            new List <Link>()
                        {
                            new Link()
                            {
                                Href = $"{Connection.MainUrl.Scheme}://{Connection.Credentials.Login}@{Connection.MainUrl.Host}/{repositoryV1.Owner}/{repositoryV1.Slug}.git"
                            }
                        }
                    };
                    repositories.Add(repo);
                }
            }


            return(repositories);
        }
        public async Task <IEnumerable <UserShort> > GetRepositoryUsers(string repositoryName, string ownerName, string filter)
        {
            var url   = ApiUrls.Mentions(ownerName, repositoryName);
            var query = new QueryString()
            {
                { "term", filter }
            };

            var request = new YouTrackRestRequest(url, Method.GET);

            foreach (var par in query)
            {
                request.AddQueryParameter(par.Key, par.Value);
            }

            var response = await _webClient.ExecuteTaskAsync <List <UserShort> >(request);

            return(response.Data);
        }