从 Azure Devops 中的存储库中提取语言

Cas*_*sen 3 azure-devops azure-devops-rest-api

我想弄清楚 Azure Devops 的存储库中使用了哪些语言。

GitHub 有一个很好的 API来获取这些信息。他们在下面使用Linguist,这非常适合我的需求。

当您查看 Azure Devops 中的仪表板时,您会看到存储库中使用的语言。

有谁知道如何计算以及如何通过 REST API 获取该数据?

谢谢

Ama*_*SFT 7

我们在项目摘要页面上仅显示前 3 种语言,其中最小语言百分比为 10,您可以通过调用此 API 获取有关语言的详细信息:

https://dev.azure.com/ {org}/{project}/_apis/projectanalysis/languagemetrics

并根据我的测试,根据项目中的文件扩展名(.js,.cs)等来检测是哪种语言。

参考:

https://developercommunity.visualstudio.com/content/problem/379275/languages-in-project-overview-prediction-endpoint.html

https://developercommunity.visualstudio.com/content/problem/601612/overview-languages-detected-not-detecting-all-lang.html

git 存储库的 Azure DevOps 语言?