Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate team and contributors for homepage automatically from GitHub. #1

bmpvieira opened this issue Nov 8, 2015 · 4 comments


Copy link

The layout is already generated from a JSON downloaded from GitHub, so it should be just a matter of making query automatically GitHub API.

Copy link

I can try to set this up. Looks like _data.json is the file in question? How did you get core and members from the GitHub API? I'm assuming you just saved a GitHub API response? There's private members on the website we'll probably have to auth the GitHub API requests to get those.

I've found

Appending /orgs/bionode/members?access_token=ACCESS_TOKEN, returns private and public members, but I still don't see how you are programmatically separating core and members.

I seem to remember there was a core team from my brief time as an admin ;)

So, maybe you need to be admin to get that info, and its two teams.

In any case, a curl$ACCESS_TOKEN > _data.json as a package.json script was what I was thinking for this.

Instead of making an environment variable for the token, committing a token that only has read:org permissions should be safe. But then anyone can see private members...which is the case on the website anyways..

Copy link
Member Author

Thanks for giving a shot at this. I've made both core and contributors public, does it help?

Copy link

It does - though maybe you didn't need to? I didn't try /org/bionode/teams before lol. (see PS)

Here's my testing with curl - I'll commit these into an npm run gen-members later..

First, with no auth, on endpoint orgs/bionode/teams:
screen shot 2016-02-21 at 1 05 26 pm

Then with my access token with read:org permissions (as an env. var.):
screen shot 2016-02-21 at 1 08 44 pm

Then copy/pasting the members_url and removing the {/member} (can obviously automate this easily):
screen shot 2016-02-21 at 1 20 29 pm

Will have to remove dupes, but thats easy.

Would be fun to do this in pure bash lol, but I'll do it up in JS for cross-platform compatibility and so its more readable than a bunch of curl url | grep login | cut -d':' -f2s lol. I'll add instructions to the readme how to use the script too. Expect a PR in the next few days..

PS. The teams are still not public - which is fine and should stay that way imo (as shown by unauthenticated API request), but I think you made it so that I, as a member of the org, can see the core and contributors team (I forget if I could before though).

@thejmazz thejmazz self-assigned this Feb 21, 2016
Copy link
Member Author

I guess there's really no reason why they shouldn't be public (also since we are trying to display them in the website). It's just a matter of figuring out how GitHub settings. Anyway, great that it's working now. I'll be waiting for the PR 👍

@bmpvieira bmpvieira added this to Backlog in Bionode Project Board Apr 4, 2017
@bmpvieira bmpvieira added the chore label Apr 4, 2017
@bmpvieira bmpvieira moved this from Backlog to Next in Bionode Project Board Apr 12, 2017
@bmpvieira bmpvieira assigned IsmailM and unassigned thejmazz Apr 12, 2017
@bmpvieira bmpvieira moved this from Next to In Progress in Bionode Project Board Apr 14, 2017
IsmailM added a commit to IsmailM/ that referenced this issue Apr 15, 2017
@bmpvieira bmpvieira added community and removed chore labels Apr 16, 2017
@bmpvieira bmpvieira moved this from In Progress to Done in Bionode Project Board Apr 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

No branches or pull requests

3 participants