【问题标题】:Extract languages from repo in Azure Devops从 Azure Devops 中的存储库中提取语言
【发布时间】:2019-12-12 11:15:47
【问题描述】:

我正在尝试找出 Azure Devops 的存储库中使用了哪些语言。

GitHub 有一个nice API 用于获取此信息。他们在下面使用Linguist,非常适合我的需求。

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

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

谢谢

【问题讨论】:

    标签: azure-devops azure-devops-rest-api


    【解决方案1】:

    我们在项目摘要页面只显示前 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

    Azure DevOps language of git repository?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-15
      • 2021-12-26
      • 2021-02-21
      • 1970-01-01
      • 2021-04-30
      • 1970-01-01
      • 1970-01-01
      • 2019-12-20
      相关资源
      最近更新 更多