我如何在github中找到用户参与的所有公共回购协议? [英] How can I find all public repos in github that a user contributes to?

查看:273
本文介绍了我如何在github中找到用户参与的所有公共回购协议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 github3 python库,并试图找到所有我们组织的用户做出了贡献(以奖励开源的支持!).
我已经有了该组织的用户列表,但是现在呢?
我可以使用公共事件迭代器查找存储库吗?

I'm using the github3 python library and am trying to find all public repos that users from our organization have contributed to (to reward the support of open source!).
I've got the list of users for the organization, but now what?
Can I use the public events iterator to find repos?

#!/usr/bin/env python
import argparse
import github3


def get_organization(github, name):
    for organization in github.iter_orgs():
        if organization.login == name:
            return organization


def main(args):
    github = github3.login(args.github_username, password=args.github_password)
    organization = get_organization(github, args.organization)

    # Get a list of all current organization contributors
    orgMembers = [member.login for member in organization.iter_members()]

# now what?  

推荐答案

您可以举一个例子

它基于 GitHub API 如何检索一个人的所有github存储库的列表?:

/users/:user/repos

(仅公共存储库)

这篇关于我如何在github中找到用户参与的所有公共回购协议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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