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

[Feature] Surface org membership errors #39

Open
jpmcb opened this issue Dec 29, 2021 · 0 comments
Open

[Feature] Surface org membership errors #39

jpmcb opened this issue Dec 29, 2021 · 0 comments
Labels

Comments

@jpmcb
Copy link
Owner

jpmcb commented Dec 29, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant