用于C#的VSTS REST API-如何获取合并提交ID的所有(不是前250个)拉取请求?

时间:2018-12-03 02:00:55

标签: c# azure-devops azure-devops-rest-api

我正在使用以下API和方法来尝试获取合并给定commitId的所有PR提交。但是API最多只能返回250。是否有参数或分页技术可以获取剩余的数据?

 public void GetAllPullRequestsForCommit(Guid repoId, string commitId)
        {
            var query = new GitPullRequestQuery();
            var input = new GitPullRequestQueryInput() { Type = GitPullRequestQueryType.Commit, Items = new List<string>() { commitId } };

            query.QueryInputs = new List<GitPullRequestQueryInput>() { input };
            var response = _gitClient.GetPullRequestQueryAsync(query, repoId).Result;
        }

0 个答案:

没有答案