如何搜索 bitbucket 的 api 仅查找特定分支/标签中的文件?

Ali*_*aka 5 bitbucket

我可以使用 bitbucket 的 api 搜索文件名和文件内容,尽管不仅仅是文件名,但这是另一个问题

我现在不知道如何在特定的提交/分支/标签中搜索。

无法找到如何使用文档执行此操作。

我所看到的是,当搜索不在 master 中但在其中一个标签中的文件时,api 找不到它:(

删除前的搜索结果:

$ curl -u "username:password" "https://api.bitbucket.org/2.0/users/alik-takipi/search/code?search_query=bitbucket-search-test"
{"query_substituted": false, "pagelen": 10, "values": [{"content_matches": [], "path_matches": [{"text": "alik.test.agent/"}, {"text": "bitbucket-search-test", "match": true}, {"text": ".txt"}], "type": "code_search_result", "file": {"path": "alik.test.agent/bitbucket-search-test.txt", "type": "commit_file", "links": {"self": {"href": "https://api.bitbucket.org/2.0/repositories/alik-takipi/public-misc/src/3ce5f354e99c76bab9e73f6119d3fe1970cf8a34/alik.test.agent/bitbucket-search-test.txt"}}}, "content_match_count": 0}], "page": 1, "size": 1}
Run Code Online (Sandbox Code Playgroud)

删除后搜索结果:

$ curl -u "username:password" "https://api.bitbucket.org/2.0/users/alik-takipi/search/code?search_query=bitbucket-search-test"
{"query_substituted": false, "pagelen": 10, "values": [], "page": 1, "size": 0}
Run Code Online (Sandbox Code Playgroud)

该文件可以在此标签中找到。