close
The Wayback Machine - https://web.archive.org/web/20201215002201/https://github.com/actions/github-script/issues/101
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

github.orgs.checkMembership is not a function #101

Open
op-ct opened this issue Nov 24, 2020 · 2 comments
Open

github.orgs.checkMembership is not a function #101

op-ct opened this issue Nov 24, 2020 · 2 comments

Comments

@op-ct
Copy link

@op-ct op-ct commented Nov 24, 2020

TypeError: github.orgs.checkMembership is not a function

https://octokit.github.io/rest.js/v17#orgs-check-membership

@op-ct op-ct changed the title TypeError: github.orgs.checkMembership is not a function github.orgs.checkMembership is not a function Nov 24, 2020
@jclem
Copy link
Collaborator

@jclem jclem commented Nov 24, 2020

This is likely due to a semi-outdated Octokit package. We update Octokit periodically, but if anything's been added in the last week or so, gitHub-script won't have it, yet.

@andrewsomething
Copy link

@andrewsomething andrewsomething commented Dec 1, 2020

In v18.x.x checkMembership was renamed to checkMembershipForUser

octokit.orgs.checkMembershipForUser({
  org,
  username,
});

https://octokit.github.io/rest.js/v18#orgs-check-membership-for-user

From the changelog:

octokit.orgs.checkMembership() has been renamed to octokit.orgs.checkMembershipForUser()

https://github.com/octokit/rest.js/releases/tag/v18.0.0

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.