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
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 684
- フォーク
- 218
- 平均マージ
- 8日 10時間
- マージ済み PR(30日)
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
エントリポイントの BuildClient.get_builds から始め、パラメーターを issue に示されている Azure CLI --query の動作と比較します。どの API 呼び出しが汎用クエリを受け付けるべきか、またそれが既存のシグネチャにどのように適合するかを判断します。get_builds で要求されたフィルタリングが機能し、サポート対象のスコープがテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- azure, python
- 領域
- api, devops
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100