在GitHub中查看最活跃的fork的直观方式 [英] Intuitive way to view most active fork in GitHub

查看:183
本文介绍了在GitHub中查看最活跃的fork的直观方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是GitHub存储库的网络图:

This is a network graph of a GitHub repository:

没有迹象表明哪个叉子上的星星和观察者最多.例如,提交可能是对文档文件的简单更新.

There is no indication of which fork has the most stars and watchers. The commits may be simple updates to documentation files, for example.

有没有一种方法可以评估GitHub中的fork,以确定哪个更活跃/受欢迎?

Is there a way to evaluate forks in GitHub to determine which ones are more active/popular?

推荐答案

我不知道一个,但是考虑到API包装程序的广度,您可能会轻松编写一个. github3.py的示例为

I don't know of one, but you could probably write one easily given the breadth of API wrappers out there. An example with github3.py would be

import github3

r = github3.repository('owner', 'repo_name')
most_watched = next(r.iter_forks(sort='watchers', number=1))

据我所知,您无法对stars进行排序,并且存储库也没有将信息返回给它们.但是,您可以对叉子进行排序,但是您必须手工完成.

As best I know, you cannot sort on stars and repositories don't have that information returned to them. You could, however, sort on forks but you would have to do it by hand.

上面的示例是两行,但您可以实现如下相同的事情:

The above example is two lines but you can achieve the same thing like so:

curl https://api.github.com/repos/owner/repo_name/forks?sort=watchers

但是,这不会限制您获得多少结果.

That won't limit how many results you get, though.

这篇关于在GitHub中查看最活跃的fork的直观方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆