[Differential] [Request, 33 lines] D3395: Patch for GitHub is never authorized Kubuntu 16.10 no crash (bug 372144)

WDavidO (William David Oldford) noreply at phabricator.kde.org
Thu Nov 17 05:49:26 UTC 2016


WDavidO created this revision.
WDavidO added a reviewer: KDevelop.
WDavidO set the repository for this revision to rKDEVELOP KDevelop.
WDavidO added a project: KDevelop.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
  Patch appends local host name and current date time to personal access token generated for kdevelop github plugin so it doesn't fail despite correct credentials when another instance of kdevelop is already authorized on the same github account.
  
  This may also fix bug https://bugs.kde.org/show_bug.cgi?id=360589 I don't have windows 8.1 and have never experienced a crash when previous authentications failed.
  
  In addition to appending to the generated token names I created a more verbose failure message which displays the name that was attempted and a link to the github personal access tokens page and a similar information message when authentication succeeds so users are better able to manage the tokens they create. I also updated the VALID_ACCOUNT message to link to the personal access tokens section of github settings (where the created token will be listed) as opposed to the generic applications section.
  
  The message boxs may be a bit overkill but would have saved me a lot of time in the original diagnosis of why tokens couldn't be created with the old method. That being said name collisions should be virtually impossible now so the messages could be slimmed down or omitted. I am reasonably concerned that someone could purge and reinstall kdevelop or something of that nature and have a number of stray access tokens without realising it so I decided to pursue a verbose approach.

TEST PLAN
  Using machines A and B (virtual is acceptable)  both with KDevelop installed and a github account that is authorized for any kdevelop installation.
  
  authorize the github account with kdevelop on machine A and it will work.
  
  Attempt to authorize the same account on machine B and it will not work without this patch. The error will also not give any indication as to why the authorization failed.

REPOSITORY
  rKDEVELOP KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D3395

AFFECTED FILES
  providers/ghprovider/ghdialog.cpp
  providers/ghprovider/ghdialog.h
  providers/ghprovider/ghresource.cpp
  providers/ghprovider/ghresource.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: WDavidO, #kdevelop
Cc: kdevelop-devel, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20161117/cb3cd813/attachment.html>


More information about the KDevelop-devel mailing list