prow-github-actions icon indicating copy to clipboard operation
prow-github-actions copied to clipboard

[Feature] Surface org membership errors

Open jpmcb opened this issue 3 years ago • 0 comments

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.

jpmcb avatar Dec 29 '21 18:12 jpmcb