Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit f434637

Browse files
authored
Fix renamed octokit/rest listEmails call (#127)
1 parent 51f9714 commit f434637

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api_server/modules/github_auth/github_authorizer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class GithubAuthorizer {
2020
this.providerInfo = this.providerInfo || providerInfo;
2121
this.octokit = new Octokit({ auth: accessToken });
2222
const userData = await this.githubApiRequest('users', 'getAuthenticated');
23-
let emailData = await this.githubApiRequest('users', 'listEmails');
23+
let emailData = await this.githubApiRequest('users', 'listEmailsForAuthenticatedUser');
2424
this.request.log('user data: ' + JSON.stringify(userData, undefined, 5));
2525
this.request.log('email data: ' + JSON.stringify(emailData, undefined, 5));
2626
emailData = emailData instanceof Array ? emailData : null;
@@ -53,7 +53,7 @@ class GithubAuthorizer {
5353
if (method === 'getAuthenticated') {
5454
return this._mockIdentity(mockCode[1]);
5555
}
56-
else if (method === 'listEmails') {
56+
else if (method === 'listEmailsForAuthenticatedUser') {
5757
return this._mockEmails();
5858
}
5959
}

0 commit comments

Comments
 (0)