clahub / clahub

Easy contributor license agreements for your GitHub projects.
https://clahub.com
MIT License
254 stars 38 forks source link

Organization repos not appearing #64

Open wizonesolutions opened 10 years ago

wizonesolutions commented 10 years ago

I've been reading through https://github.com/clahub/clahub/pull/26 and the changes made there. Though not intimately familiar with the Ruby GitHub wrapper library being used, I have been trying to use the GitHub API Console to test what I think CLAHub is doing and ensure it's not a data issue.

...OK, I actually looked up github_api to see what CLAHub is doing org_repos method.

First it lists my orgs (/user/orgs) and starts iterating over them.

For each |org| it lists the repos, passing in org. github_api translates this to a call to /orgs/<orgname>/repos.

So far so good (following along in the API console).

Then it simply checks repo.permissions.admin. When I check the JSON output for this, it says true. So the repo should get added to repos and returned at the end.

It doesn't seem to. Is there some kind of caching/time lag on CLAHub, and maybe things will just clear up in a while on their own? I tried adding a ?1 to the end of https://www.clahub.com/agreements/new to bust the cache, but maybe it's not that simple.

wizonesolutions commented 10 years ago

(Ah, in case it's unclear, I'm not running my own. I'm using the website — hence the caching question. I just looked at the code to check if CLAHub actually supported organizations, etc.)

wizonesolutions commented 10 years ago

Anyone have tips on this?

rpadams commented 10 years ago

+1 on this. My research group has an organization and I can't see its public repos.

ScottKillen commented 10 years ago

+1 From me as well. The repos in organizations that I have owner ship of are not showing, however the repos in organization where I have commit-only rights are showing.

In other words, I am a member of 4 organizations. In three of those, I am an owner and in one I am a comitter. CLAHUB shows my personal repositories along with repositories from the organization I do not own.

jedmccaleb commented 9 years ago

+1 would be great to support organization's repos

julanrouge commented 9 years ago

+1 :)

jasonm commented 9 years ago

Hi @wizonesolutions @rpadams @ScottKillen @jedmccaleb @julanrouge - org repos appear to be working for me. It might be an issue with membership publication/concealment.

Do the organizations you expect show up on your public profile - that is, visiting your own github page while not logged in (e.g. incognito)?

If there are organizations you expect to show up here but don't, you may need to publicize your membership to the organization. CLAhub can't find out about organizations where your membership is concealed. E.g. @ScottKillen I only see your membership in @Soartex-Modded so it's possible that the other three memberships are there, but just concealed.

If you'd like to check the exact API response that CLAhub is querying, you can try this quick test:

  1. Visit https://github.com/settings/tokens/new and generate a new token that has the public_repo permission.
  2. Visit https://api.github.com/user/orgs?access_token=token-you-created-in-step-1
  3. See if the organization(s) you expect to appear do so?
ScottKillen commented 9 years ago

Thanks @jasonm . I thought all of my memberships were public. I will revisit.