Skip to content

Commit e725f96

Browse files
authored
Log some auth info (#95)
1 parent c7c0dfd commit e725f96

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

GithubCommentReader/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,14 @@ async function webhook(params) {
524524
const log = params.log;
525525
const cli = getGHClient();
526526

527+
try {
528+
const u = await cli.users.getAuthenticated();
529+
log(`Authenticated as ${u.data.login}`);
530+
log(`Scopes: ${u.headers["x-oauth-scopes"]}`);
531+
} catch (e) {
532+
log(`Failed to get token user info: ${e}`);
533+
}
534+
527535
let lines = params.commentBody.split("\n").map((line) => line.trim());
528536
let hasTestIt = false;
529537
lines = lines.filter((line) => {

0 commit comments

Comments
 (0)