2.0.0 • Published 4 months ago

screwdriver-scm-github-graphql v2.0.0

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
4 months ago

scm-github-graphql

Version Downloads Build Status Open Issues License

Usage

npm install screwdriver-scm-github-graphql

Initialization

The class interacts with (GitHub GraphQL API)https://docs.github.com/en/enterprise-cloud@latest/graphql/overview/about-the-graphql-api The following configuration is needed

ParameterTypeDefaultDescription
configObjectConfiguration Object
config.graphQlUrlStringhttps://api.github.com/graphqlGithub GraphQL API Endpoint
const scm = new GithubScmGraphQL({
    graphQlUrl: 'https://api.github.com/graphql'
});

Methods

getEnterpriseUserAccount

Required parameters:

ParameterTypeDescription
schemaObjectThe schema object
schema.slugStringThe github enterprise slug
schema.loginStringThe github user's login name
schema.tokenStringThe github token to interact with the graphql api

Expected Outcome

Gets the enterprise user account based on schema https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/objects#enterpriseuseraccount

listEnterpriseMembers

Required parameters:

ParameterTypeDescription
schemaObjectThe schema object
schema.slugStringThe github enterprise slug
schema.tokenStringThe github token to interact with the graphql api

Expected Outcome

This method retrieves a list of enterprise members based on schema https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/unions#enterprisemember.

getUser

Required parameters:

ParameterTypeDescription
schemaObjectThe schema object
schema.loginStringThe github user's login name
schema.tokenStringThe github token to interact with the graphql api
Expected Outcome

Returns the github user based on schema https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/objects#user

Testing

npm test

License

Code licensed under the BSD 3-Clause license. See LICENSE file for terms.

1.2.0

4 months ago

2.0.0

4 months ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago