Skip to content

Commit

Permalink
Merge pull request #1348 from danger/revert-1337-fix-github-action
Browse files Browse the repository at this point in the history
Revert "Moving the GITHUB_WORKFLOW check before actually getting the userInfo"
  • Loading branch information
orta committed Jan 18, 2023
2 parents 47dfcfa + fed6d23 commit 6fc25ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/platforms/github/GitHubAPI.ts
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 6fc25ff

Please sign in to comment.