How to use the @octokit/rest.orgs function in @octokit/rest

To help you get started, we’ve selected a few @octokit/rest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gatsbyjs / api.gatsbyjs.org / src / graphql / __tests__ / resolvers.js View on Github external
test('invites the user to Gatsby’s GitHub org if necessary', async () => {
        axios
          .mockResolvedValueOnce(mockShopifyCustomerCreateSuccess)
          .mockResolvedValueOnce(mockShopifyAddTagsSuccess);

        gh.search.issues.mockResolvedValueOnce(mockGitHubIssueSearchResult);
        gh.orgs.getTeamMembership.mockRejectedValueOnce({ code: 404 });

        await resolvers.Mutation.createContributor(null, contributorInput);

        expect(gh.orgs.addTeamMembership).toBeCalled();
      });
github gatsbyjs / api.gatsbyjs.org / src / graphql / __tests__ / resolvers.js View on Github external
test('invites the user to Gatsby’s GitHub org if necessary', async () => {
        axios
          .mockResolvedValueOnce(mockShopifyCustomerCreateSuccess)
          .mockResolvedValueOnce(mockShopifyAddTagsSuccess);

        gh.search.issues.mockResolvedValueOnce(mockGitHubIssueSearchResult);
        gh.orgs.getTeamMembership.mockRejectedValueOnce({ code: 404 });

        await resolvers.Mutation.createContributor(null, contributorInput);

        expect(gh.orgs.addTeamMembership).toBeCalled();
      });