salarkhan / git-pear

swap credentials after each commit
3 stars 0 forks source link

Use optional API key to get user full names #58

Open salarkhan opened 10 years ago

salarkhan commented 10 years ago

screen shot 2014-09-04 at 4 57 50 pm

salarkhan commented 10 years ago

so, if the user has no public profile address, do we output a reminder, telling them to do so? or does that go against rule of silence?

anyway, gonna get this done tonight hopefully

salarkhan commented 10 years ago

curl -s https://api.github.com/search/users?q=in:email+$1 | grep "login" | sed 's/[\"\',' ]//g' | cut -d ':' -f 2 gets us your username. i can prob get rid of that cut call if i redo my sed

anyways, it'll take 1 more call to get the full name. are we cool with just the username or what?

salarkhan commented 10 years ago

yo @supertopher ...how do you do .env kinda shit with a script?

like, how the fish do you keep your API token safe?

supertopher commented 10 years ago

https://github.com/Devbootcamp/kitout/tree/master/sgu-key might help. also it's YOUR computer, the key should be fairly safe so long as we aren't sending them one

salarkhan commented 10 years ago

okay, so here's wsup.

we do the optional API call thing. here's what we put in the README if you want to prevent rate limiting, set GIT_PEAR_TOKEN=your_token_goes_here in your bash_profile.

this info should be available via the usage script as well, i think

salarkhan commented 10 years ago

once this is done, hombrew.

i'd like to push away all refactoring/non feature shit like #61 off for like a v1.1