git 如何为 GitHub 项目生成统计信息?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6610525/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 11:17:58  来源:igfitidea点击:

How to generate stats for a GitHub project?

gitgithubreporting

提问by user217562

Is there an easy/efficient way to generate some high-level reports for a particular GitHub project?

有没有一种简单/有效的方法来为特定的 GitHub 项目生成一些高级报告?

e.g. lines of code committed over time, top contributors, etc

例如,随着时间的推移提交的代码行、顶级贡献者等

采纳答案by VonC

You can try applying gitstatsto a cloned repo of your GitHub repo.

您可以尝试将gitstats应用于 GitHub 存储库的克隆存储库。

See for example the activity of the Git repo itself, with many data like the commits per year/month:

例如,请参阅Git 存储库本身活动,其中包含许多数据,例如每年/每月的提交次数:

Commits by year/month

按年/月提交



See also "Looking at Git Statistics", with the GitHub 'yearly_stats'for a simple little script.

另请参阅“查看 Git 统计信息”,使用GitHub 'yearly_stats'获取一个简单的小脚本。



Update April 2013 ("Get up to speed with Pulse"):

2013 年 4 月更新(“了解 Pulse”):

Check out Pulse

检查脉冲

Pulse is a great way to discover recent activity on projects.
Maybe you haven't checked on your favorite repository in a while or you just discovered a project that looks interesting to you. Pulse will show you who has been actively committing and what has changed in a project's default branch:

Pulse 是发现项目最近活动的好方法。
也许您有一段时间没有检查您最喜欢的存储库,或者您刚刚发现了一个看起来很有趣的项目。 Pulse 将向您显示谁一直在积极提交以及项目默认分支中发生了什么变化

Pulse

脉冲

You can find the link to the left of the nav bar.

您可以在导航栏左侧找到链接

Link

关联

回答by Fbo

You should have a look to repoXplorer, an open source project I develop. It is able to compute stats for a project (a group of git repositories) as well as for a contributor and a group of contributors. It provides a REST interface and a web UI. The web UI provides various information like, for a project:

您应该看看repoXplorer,这是我开发的一个开源项目。它能够计算一个项目(一组 git 存储库)以及一个贡献者和一组贡献者的统计数据。它提供了一个 REST 接口和一个 Web UI。Web UI 为项目提供各种信息,例如:

  • commits and authors count
  • date histogram of commits
  • date histogram of authors
  • top authors by commits
  • top authors by lines changed
  • top new authors compared to a given period
  • 提交和作者计数
  • 提交的日期直方图
  • 作者的日期直方图
  • 提交次数最多的作者
  • 按行更改的顶级作者
  • 与特定时期相比的顶级新作者

But best is to have a look to the demo instance here.

但最好是看看这里的演示实例。

Here is a screenshot of the stats of the Kubernetes project (all git repositories of github organization of kubernetes):

下面是 Kubernetes 项目的 stats 截图(kubernetes 的 github 组织的所有 git 仓库):

kubernetes stats

Kubernetes 统计数据

回答by Jordi Cabot

Now there are several tools that you could use (e.g. see this rather complete list: https://livablesoftware.com/tools-mine-analyze-github-git-software-data/)

现在有几种工具可供您使用(例如,请参阅这个相当完整的列表:https: //livablesoftware.com/tools-mine-analyze-github-git-software-data/

The right tool for you will also depend on you're just interested in the "git" part of the project or the "GitHub" part (i.e. stats on community activity).

适合您的工具还取决于您只对项目的“git”部分或“GitHub”部分(即社区活动的统计信息)感兴趣。

I'd start by checking GrimtheitroadeLab, Apache Kibbleand Sourced. They all allow you to configure and create a dashboard to display several metrics around your project

我首先检查GrimtheitroadeLabApache KibbleSourced。它们都允许您配置和创建仪表板来显示您项目的多个指标

回答by SuRaMoN

I am the author of weave-gitstats. Its opensource and based on weave. Most git statistics generators like gitstatsor the statistics provided by github are "static", they don't have drilldown functionality, filtering and are limited to some default graphs. Weave-gistats provides a lot of dynamic dashboards that allow you to filter on eg year, author and allow you to create your own graphs using your own criteria.

我是weave-gitstats的作者。它是开源的,基于weave。大多数 git 统计生成器(如gitstats或 github 提供的统计信息)都是“静态的”,它们没有向下钻取功能、过滤功能,并且仅限于某些默认图形。Weave-gistats 提供了许多动态仪表板,允许您根据年份、作者等进行过滤,并允许您使用自己的标准创建自己的图表。