{"id":22351865,"url":"https://github.com/screwdriver-cd/scm-github-graphql","last_synced_at":"2025-04-12T17:44:55.631Z","repository":{"id":229081900,"uuid":"774986531","full_name":"screwdriver-cd/scm-github-graphql","owner":"screwdriver-cd","description":"Module to query github graphql api","archived":false,"fork":false,"pushed_at":"2025-02-21T16:51:35.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-04-03T09:01:34.276Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/screwdriver-cd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-20T15:01:54.000Z","updated_at":"2025-02-21T16:50:08.000Z","dependencies_parsed_at":"2025-03-12T20:44:02.538Z","dependency_job_id":null,"html_url":"https://github.com/screwdriver-cd/scm-github-graphql","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"bce30beb5018af22be0fee079178b3b63d379b49"},"previous_names":["screwdriver-cd/scm-github-graphql"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fscm-github-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fscm-github-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fscm-github-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fscm-github-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/screwdriver-cd","download_url":"https://codeload.github.com/screwdriver-cd/scm-github-graphql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248609494,"owners_count":21132914,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T12:16:07.285Z","updated_at":"2025-04-12T17:44:55.611Z","avatar_url":"https://github.com/screwdriver-cd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scm-github-graphql\n[![Version][npm-image]][npm-url] ![Downloads][downloads-image] [![Build Status][status-image]][status-url] [![Open Issues][issues-image]][issues-url] ![License][license-image]\n\n## Usage\n\n```bash\nnpm install screwdriver-scm-github-graphql\n```\n\n### Initialization\n\nThe class interacts with (GitHub GraphQL API)[https://docs.github.com/en/enterprise-cloud@latest/graphql/overview/about-the-graphql-api]\nThe following configuration is needed\n\n| Parameter        | Type  |  Default | Description |\n| :-------------   | :---- | :-------------| :-------------|\n| config        | Object | | Configuration Object |\n| config.graphQlUrl | String | https://api.github.com/graphql | Github GraphQL API Endpoint |\n```js\nconst scm = new GithubScmGraphQL({\n    graphQlUrl: 'https://api.github.com/graphql'\n});\n```\n\n### Methods\n\n#### getEnterpriseUserAccount\nRequired parameters:\n\n| Parameter        | Type  |  Description |\n| :-------------   | :---- | :-------------|\n| schema     | Object | The schema object |\n| schema.slug     | String | The github enterprise slug |\n| schema.login      | String | The github user's login name |\n| schema.token | String | The github token to interact with the graphql api |\n\n#### Expected Outcome\n\nGets the enterprise user account based on schema https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/objects#enterpriseuseraccount\n\n#### listEnterpriseMembers\nRequired parameters:\n\n| Parameter        | Type  |  Description |\n| :-------------   | :---- | :-------------|\n| schema     | Object | The schema object |\n| schema.slug     | String | The github enterprise slug |\n| schema.token | String | The github token to interact with the graphql api |\n\n#### Expected Outcome\n\nThis method retrieves a list of enterprise members based on schema https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/unions#enterprisemember.\n\n##### getUser\nRequired parameters:\n\n| Parameter        | Type  |  Description |\n| :-------------   | :---- | :-------------|\n| schema     | Object | The schema object |\n| schema.login     | String | The github user's login name |\n| schema.token | String | The github token to interact with the graphql api |\n\n##### Expected Outcome\nReturns the github user based on schema https://docs.github.com/en/enterprise-cloud@latest/graphql/reference/objects#user\n\n## Testing\n\n```bash\nnpm test\n```\n\n## License\n\nCode licensed under the BSD 3-Clause license. See LICENSE file for terms.\n\n[npm-image]: https://img.shields.io/npm/v/screwdriver-scm-github-graphql.svg\n[npm-url]: https://npmjs.org/package/screwdriver-scm-github-graphql\n[downloads-image]: https://img.shields.io/npm/dt/screwdriver-scm-github-graphql.svg\n[license-image]: https://img.shields.io/npm/l/screwdriver-scm-github-graphql.svg\n[issues-image]: https://img.shields.io/github/issues/screwdriver-cd/screwdriver.svg\n[issues-url]: https://github.com/screwdriver-cd/screwdriver/issues\n[status-image]: https://cd.screwdriver.cd/pipelines/13562/badge\n[status-url]: https://cd.screwdriver.cd/pipelines/13562\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrewdriver-cd%2Fscm-github-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrewdriver-cd%2Fscm-github-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrewdriver-cd%2Fscm-github-graphql/lists"}