From fed6d23551ed5537dca13f3bbc028cbdcb7d98f6 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Wed, 18 Jan 2023 08:37:27 +0000 Subject: [PATCH] Revert "Moving the GITHUB_WORKFLOW check before actually getting the userInfo" --- source/platforms/github/GitHubAPI.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/platforms/github/GitHubAPI.ts b/source/platforms/github/GitHubAPI.ts index b6d5093f2..9c919b1ad 100644 --- a/source/platforms/github/GitHubAPI.ts +++ b/source/platforms/github/GitHubAPI.ts @@ -130,6 +130,11 @@ export class GitHubAPI { return parseInt(perilID) } + const info = await this.getUserInfo() + if (info.id) { + return info.id + } + const useGitHubActionsID = process.env["GITHUB_WORKFLOW"] if (useGitHubActionsID) { // This is the user.id of the github-actions app (https://github.com/apps/github-actions) @@ -138,11 +143,6 @@ export class GitHubAPI { return 41898282 } - const info = await this.getUserInfo() - if (info.id) { - return info.id - } - return undefined }