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
Allow commenting on Gistlog without leaving UI #78
Allow commenting on Gistlog without leaving UI #78
Conversation
…ogin and user creation via Socialite
…actual comment posting route.
…from-gistlog # Conflicts: # composer.lock
@@ -53,4 +55,11 @@ public function show($username, $gistId) | |||
->with('gistlog', $gistlog) | |||
->with('pageTitle', $gistlog->title . ' | ' . $gistlog->author); | |||
} | |||
|
|||
public function postComment(Request $request, GistClient $client, $gistId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected 1 space between comma and argument $gistId
; 2 found
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@mattstauffer is the convention on these actually going to be spaces vs tabs? I can correct this if needed, only problem is that the entire code base is currently using tabs for indentation. In fact, I had my code using spaces and changed it to tabs to match the indentations. |
@JacobBennett We'll switch to spaces once all the PRs are merged. :) No worries, there's just no way at the moment to teach nitpick to chill out on the space sniffing. :) |
use Illuminate\Contracts\Auth\Guard; | ||
use Illuminate\Contracts\Auth\Registrar; | ||
use Gistlog\User; | ||
use Exception; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alphabetize use block plz
text-align: right; | ||
transition: margin 0.25s; | ||
|
||
&.active{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space after active
@JacobBennett Tried it out; looks good! Could you make these changes and do a merge resolution and then ping me? I need to run it one more time, but I'm out of time now, so I'm going to use asking you to make a few changes as the tool to give me more time until I can actually check it out one more time when you push the updated code. :) Thanks man! |
…on flash, update socialite github scope to include email
…rom authorization.
# Conflicts: # .env.example # config/services.php
@mattstauffer this is ready to merge in with master 👍 |
Hey @JacobBennett, the UI looks great, as does the code. I just tried to run this and got an authentication issue; have you run into this? I regenerated my token and key and secret for the I'm getting this:
In meetings and giving this only 40% of my brain right now, so I'll try to look at it more tonight, but would love to hear if you have run into this before. |
@mattstauffer I do remember having this issue at one point but don't remember how I solved it. I'll dig into it a bit and get back at you when I have a good solution and explanation for you. |
@mattstauffer it looks like this is due to trying to authenticate with GitHub when the application asks for a When the service provider ( I assume that the work around @JacobBennett use was to either create a personal access token, or manually execute the auth flow to get a token. This token is then used for any requests by gistlog to GitHub's API. Socialite needs the
with
Gistlog can continue to use it's token (i.e. host my own instance of Gistlog and create a token for it) for the 'public' requests, but use the authorised user's token when posting comments. |
@deringer I can only hope to someday be as wise as you! Thank you for taking the time to diagnose this! You are correct that I in fact generated a personal token to use in my local repo. I can make the changes you described above in the service providers and commit those to this branch. It makes a whole bunch of sense now that you have laid it out. @mattstauffer agreed? |
Thanks man! It was only because I made some changes to the codebase over the weekend that I had noticed the issue - it's only a minor detail, but from my brief testing here, appears to be the cause of the problems :) |
@mattstauffer think this guy is ready to pull in. Did some local testing after the most recent changes and think we should be all set. Thanks! |
@JacobBennett Great, will pull down and try again. Thanks! |
Here goes nothing! |
…om-gistlog Allow commenting on Gistlog without leaving UI
fixes Issue #7
requires PR #77
This adds user creation and login through socialite with the purpose of allowing users to comment on a Gistlog post without having to leave the post itself.