Skip to content

Commit

Permalink
Revert "Moving the GITHUB_WORKFLOW check before actually getting the …
Browse files Browse the repository at this point in the history
…userInfo"
  • Loading branch information
orta committed Jan 18, 2023
1 parent 47dfcfa commit fed6d23
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/platforms/github/GitHubAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -138,11 +143,6 @@ export class GitHubAPI {
return 41898282
}

const info = await this.getUserInfo()
if (info.id) {
return info.id
}

return undefined
}

Expand Down

0 comments on commit fed6d23

Please sign in to comment.