diff --git a/source/platforms/github/GitHubAPI.ts b/source/platforms/github/GitHubAPI.ts index 9c919b1ad..b6d5093f2 100644 --- a/source/platforms/github/GitHubAPI.ts +++ b/source/platforms/github/GitHubAPI.ts @@ -130,11 +130,6 @@ 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) @@ -143,6 +138,11 @@ export class GitHubAPI { return 41898282 } + const info = await this.getUserInfo() + if (info.id) { + return info.id + } + return undefined }