Skip to content

Commit

Permalink
Merge pull request #1337 from stodirascu/fix-github-action
Browse files Browse the repository at this point in the history
Moving the GITHUB_WORKFLOW check before actually getting the userInfo
  • Loading branch information
orta committed Nov 12, 2022
2 parents 639898f + beb7f41 commit f8453e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/platforms/github/GitHubAPI.ts
Expand Up @@ -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)
Expand All @@ -143,6 +138,11 @@ export class GitHubAPI {
return 41898282
}

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

return undefined
}

Expand Down

0 comments on commit f8453e9

Please sign in to comment.