Chris Fewtrell
Chris Fewtrell

Reputation: 7725

GitHub: How to list all the private repositories that a particular user has forked?

When you remove a user from an organization, GitHub warns you that all their forks of the organisation's private repos will be deleted

Removing people from the XX organization will also delete their forks of any private XX-owned repositories.

And GitHub tells you how many private forks the user has but it does not tell you the repo names (even though I have permission to see them!)

It would be useful to see the repos so that I can check that they really have no outstanding, potentially useful, work left on branches (that they have not opened pull-request for).

Upvotes: 2

Views: 2086

Answers (2)

cartland
cartland

Reputation: 599

To do it from the Web U:

  1. Go to the people tab of the organization (https://github.com/orgs/myorg/people).
  2. Filter/find the person.
  3. Click their name; this will take you to https://github.com/orgs/myorg/people/theirusername, which lists all repos they have access to, including repos in the organization and forks the user has made of them.
  4. Filter the list by their username; this will show just the forks.

This requires owner permissions for the organization.

Upvotes: 5

bitoiu
bitoiu

Reputation: 7484

There's a GitHub API to list all the forks. I haven't tested the API but I assume that you will get ONLY the public forks for other users and all the forks if you're the authenticated user.

If you wanted to query this on behalf of other users you can work on a GitHub Integration that would get users' permissions via OAuth and then you could store that information on your side for a whole group of people.


I don't think this is what you were asking for but additionally there's a WEB UI filter for forked repositories, e.g., https://github.com/defunkt?utf8=%E2%9C%93&tab=repositories&q=&type=fork.

Upvotes: 2

Related Questions