Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving the GITHUB_WORKFLOW check before actually getting the userInfo #1337

Merged
merged 1 commit into from Nov 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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