mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 12:47:14 +00:00
Fix GitHub account ids being numbers (#228045)
For a long time the account id wasn't handled correctly. It should be a string, but the API returns a number. This ensures it's a string and does some migration logic.
This commit is contained in:
committed by
GitHub
parent
d8af24e15d
commit
c4d1cc2e67
@@ -228,9 +228,9 @@ export class GitHubServer implements IGitHubServer {
|
||||
|
||||
if (result.ok) {
|
||||
try {
|
||||
const json = await result.json();
|
||||
const json = await result.json() as { id: number; login: string };
|
||||
this._logger.info('Got account info!');
|
||||
return { id: json.id, accountName: json.login };
|
||||
return { id: `${json.id}`, accountName: json.login };
|
||||
} catch (e) {
|
||||
this._logger.error(`Unexpected error parsing response from GitHub: ${e.message ?? e}`);
|
||||
throw e;
|
||||
|
||||
Reference in New Issue
Block a user