prow-github-actions
prow-github-actions copied to clipboard
[Feature] Surface org membership errors
In this chunk, when checking the membership of the commenter:
try {
if (context.payload.repository === undefined) {
core.debug(`checkOrgMember error: context payload repository undefined`)
return false
}
await octokit.orgs.checkMembership({
org: context.payload.repository.owner.login,
username: user
})
return true
} catch (e) {
return false
}
We don't surface the error when it's thrown. This would be really useful information, especially since GitHub org and Auth stuff can be really really tricky.