npm install screwdriver-scm-github-graphql
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
Parameter | Type | Default | Description |
---|---|---|---|
config | Object | Configuration Object | |
config.graphQlUrl | String | https://api.github.com/graphql | Github GraphQL API Endpoint |
const scm = new GithubScmGraphQL({
graphQlUrl: 'https://api.github.com/graphql'
});
Required parameters:
Parameter | Type | Description |
---|---|---|
schema | Object | The schema object |
schema.slug | String | The github enterprise slug |
schema.login | String | The github user's login name |
schema.token | String | The github token to interact with the graphql api |
Gets the enterprise user account based on schema https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/objects#enterpriseuseraccount
Required parameters:
Parameter | Type | Description |
---|---|---|
schema | Object | The schema object |
schema.slug | String | The github enterprise slug |
schema.token | String | The github token to interact with the graphql api |
This method retrieves a list of enterprise members based on schema https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/unions#enterprisemember.
Required parameters:
Parameter | Type | Description |
---|---|---|
schema | Object | The schema object |
schema.login | String | The github user's login name |
schema.token | String | The github token to interact with the graphql api |
Returns the github user based on schema https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/objects#user
npm test
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.