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

Query GitHub for current user when using PAT #258

Closed
wants to merge 1 commit into from

Conversation

@edvbld
Copy link
Member

edvbld commented Nov 19, 2019

Hi all,

please review this patch that queries GitHub for the current user when using a PAT as credentials with GitHubHost.java. The reason for this is that some credentials manager, in particular Git Credential Manager on Windows, always seems to return "PersonalAccessToken" as the username when calling git credential fill. The fix is simple, just query the /user endoint instead of /users.

Thanks,
Erik

Testing

  • Manual testing with git pr and PAT on Linux x64 with a bogus username in credential store.

Progress

  • Change must not contain extraneous whitespace
  • Change must be properly reviewed

Approvers

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 19, 2019

👋 Welcome back ehelin! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request (refresh this page to view it).

@edvbld
Copy link
Member Author

edvbld commented Nov 19, 2019

Thanks @RealCLanger for helping out with debugging this!

@openjdk openjdk bot added the rfr label Nov 19, 2019
@mlbridge
Copy link

mlbridge bot commented Nov 19, 2019

Webrevs

Copy link
Member

rwestberg left a comment

Looks good!

@openjdk openjdk bot removed the rfr label Nov 20, 2019
@openjdk
Copy link

openjdk bot commented Nov 20, 2019

@edvbld This change can now be integrated. The commit message will be:

Query GitHub for current user when using PAT

Reviewed-by: rwestberg
  • If you would like to add a summary, use the /summary command.
  • To list additional contributors, use the /contributor command.

Since the source branch of this PR was last updated there have been 2 commits pushed to the master branch:

  • 483310e: Improve MimeText conformance
  • 47f068b: git-sync --fetch is a no-op

Since there are no conflicts, your changes will automatically be rebased on top of the above commits when integrating. If you prefer to do this manually, please merge master into your branch first.

  • To integrate this PR with the above commit message, type /integrate in a new comment.
@openjdk openjdk bot added the ready label Nov 20, 2019
@edvbld
Copy link
Member Author

edvbld commented Nov 20, 2019

/integrate

@openjdk openjdk bot closed this Nov 20, 2019
@openjdk openjdk bot added the integrated label Nov 20, 2019
@openjdk
Copy link

openjdk bot commented Nov 20, 2019

@edvbld The following commits have been pushed to master since your change was applied:

  • 483310e: Improve MimeText conformance
  • 47f068b: git-sync --fetch is a no-op

Your commit was automatically rebased without conflicts.

Pushed as commit 2881d91.

@openjdk openjdk bot removed the ready label Nov 20, 2019
@mlbridge
Copy link

mlbridge bot commented Nov 20, 2019

Mailing list message from Erik Helin on skara-dev:

Changeset: 2881d91
Author: Erik Helin
Date: 2019-11-20 14:37:02 +0000
URL: https://git.openjdk.java.net/skara/commit/2881d91f

Query GitHub for current user when using PAT

Reviewed-by: rwestberg

! forge/src/main/java/org/openjdk/skara/forge/github/GitHubHost.java

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.