microsoft / microsoft/azure-devops-python-api
Add support for using generic query in get_builds or rather any API call that supports AZ Cli --query parameter
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 684
- 派生
- 218
- 平均合并
- 8 天 10 小时
- 30 天内合并 PR
- 1
描述
I am trying to get builds which triggers only on pull requests to main.
az pipelines runs list --query [? contains(sourceBranch,'refs/pull')]
Above command gives me all builds that uses source branch as refs/pull/<pr_number>/merge
In get_builds method of build client there is no way to do this.
branch_name parameter works only when you specify explicit branch name.
I realized that I could use "reason_filter=pullRequest" but it would be helpful if generic query parameter is supported in all those API calls where, AZ cli has --query parameter.
Is there any way to specify query in such API requests?
def get_builds(self, project, definitions=None, queues=None, build_number=None, min_time=None, max_time=None, requested_for=None, reason_filter=None, status_filter=None, result_filter=None, tag_filters=None, properties=None, top=None, continuation_token=None, max_builds_per_definition=None, deleted_filter=None, query_order=None, branch_name=None, build_ids=None, repository_id=None, repository_type=None):
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 BuildClient.get_builds 入口点开始,将其参数与 issue 中所示的 Azure CLI --query 行为进行比较。确定哪些 API 调用应接受通用查询,以及这如何适配它们现有的签名;当 get_builds 的请求过滤功能正常工作,并且受支持的范围已由测试覆盖时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- azure, python
- 领域
- api, devops
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100