microsoft / microsoft/azure-devops-python-api

"filter_contains" argument causes get_refs to find no matches

未關閉
#307 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

question
主要語言
Python
星號
684
分支
218
平均合併
8 天 10 小時
30 天內合併 PR
1

描述

Hi,

I have a piece of code that uses get_refs with a prefix filter argument. I observed the results and then I put in filter_contains a character that I can see exists in all the refs returned from the first call to get_refs. The call with the filter_contains returns 0 refs.

refs = self._connection.clients_v5_1.get_git_client().get_refs(repository_id = repo_id,
                                      project = project_id,
                                      filter = prefix_filter,
                                      peel_tags = True,
                                      include_statuses = True,
                                      latest_statuses_only = True,
                                      top = 100,
                                      continuation_token = continuation_token)

In this example, all relevant ref name field contain the character 'V'. The call:

refs = self._connection.clients_v5_1.get_git_client().get_refs(repository_id = repo_id,
                                      project = project_id,
                                      filter = prefix_filter,
                                      peel_tags = True,
                                      include_statuses = True,
                                      latest_statuses_only = True,
                                      top = 100,
                                      continuation_token = continuation_token,
                                      filter_contains = "V")

results in refs containing 0 results, and the call returns almost immediately, as opposed to taking several seconds in the first call.

Thanks.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 Python 用戶端的 get_refs 進入點開始,檢查 filter 和 filter_contains 引數是如何傳送的。使用包含 'V' 的 refs 重現回報的情況,然後驗證 filter_contains 會回傳這些相符的 refs,而不是空的結果。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
api, devops
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。