-
Notifications
You must be signed in to change notification settings - Fork 240
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
Clean up and Github API #11
Conversation
…d away from app.js so reading this thing is easier
👍 |
Maybe we should just use the github API to read who the contributors to the master branch are, and make that the list? Then we can make the site github-login only. |
@msied using the Github API to track contributors is a great idea. |
Getting this error, I think passport needs to be passed into config/index.js, ideas?
|
My bad. Just pushed the fix. |
…rectory... woops!
Sorry about that. Something else was wrong--but now it works and runs locally without a hitch. |
UPDATE: added github api use for authentication. On each login attempt, the userlist is queried from repo contributors of this repo. |
This is awesome, thanks. Do you know what counts as a contributor in terms of the api? Is it only people who have code in the tree via pull request or direct commit? |
It's just people who have had their stuff merged to master, it looks like. https://api.github.com/repos/larvalabs/pullup/contributors |
I'm split on whether to use the API for 2 reasons:
Not sure overall. |
You change the instructions. Define the pre-query array with one member On Friday, February 7, 2014, Matt Hall notifications@github.com wrote:
|
… bypass github auth strategy.
…utor list given by the API. The auth strategy will look to see if process.env.PORT exists, and uses the github strategy proper. If it does not exist, bypasses the requirement.
Or you just look for process.env.PORT during auth. If it doesn't exist (loosely implying local dev [will need a more accurate indicator]), auth is bypassed and login allowed. |
Having gone through a bunch of merges now, there's another issues that's coming up. There are people that I've taken code from both of their PRs, made one commit and added both their names and pushed that. So they don't appear in the official contributers, but they're users. The github api scheme would force me to accept a PR to allow them access. Maybe that's not a big deal, they could just do a simple unrelated PR, not sure. |
That's the beauty of the github auth solution. You do automatic PR merges On Fri, Feb 7, 2014 at 12:47 PM, Matt Hall notifications@github.com wrote:
|
I created an issue (#67) for dealing with this feature. For local dev, couldn't you just reference your own GitHub fork of the repo? Or would you not be listed as a contributor until you pushed code to your repo? I think using process.env.PORT is a bit hacky, it would be better to have a dedicated environment variable denoting the environment (production vs dev). |
@treygriffith I agree about the hackyness of that suggestion--I just wanted to address @megamattron 's concerns quickly to demonstrate the non-issue. I'm still not a merged/auth'd user. A process.env.PRODUCTION = true would be ideal. |
Yeah, I'm definitely leaning towards the API route now, especially after doing a ton of manual merges on the userlist file :) Let me give this PR a shot and see if I can get it working. |
@megamattron The people whose PR's you didn't directly accept may have to resubmit a new PR to get access after this PR is merged, but that's only a handful of users, and access to Pullup isn't exactly mission critical yet. |
@msied I just realized you never did get access while we were figuring this out, I'm going to add you to the user list because of the contribution even though I'm not quite sure what I'm doing with this PR yet. You should have access shortly. |
The alphabetical userlist has solved the merging problem for the most part, but I'd love to use the github API for user contribution stats, anyone interesting in retasking this for that purpose? |
...way from app.js so reading this thing is easier