{"id":22351904,"url":"https://github.com/screwdriver-cd/scm-github","last_synced_at":"2025-07-30T07:32:01.222Z","repository":{"id":10465270,"uuid":"65842228","full_name":"screwdriver-cd/scm-github","owner":"screwdriver-cd","description":"Github implementation of the scm-base class","archived":false,"fork":false,"pushed_at":"2024-11-08T17:52:32.000Z","size":615,"stargazers_count":2,"open_issues_count":0,"forks_count":10,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-11-08T18:36:26.188Z","etag":null,"topics":["github"],"latest_commit_sha":null,"homepage":"https://cd.screwdriver.cd/pipelines/8","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/screwdriver-cd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2016-08-16T18:02:02.000Z","updated_at":"2024-11-08T17:49:42.000Z","dependencies_parsed_at":"2023-11-15T04:26:48.699Z","dependency_job_id":"8c6a82dc-0a54-4cf9-9dbb-9673ccd59c97","html_url":"https://github.com/screwdriver-cd/scm-github","commit_stats":{"total_commits":208,"total_committers":50,"mean_commits":4.16,"dds":0.8317307692307692,"last_synced_commit":"5c37be4d78dd4bb1055005b68a836c01a429e016"},"previous_names":[],"tags_count":211,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fscm-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fscm-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fscm-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/screwdriver-cd%2Fscm-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/screwdriver-cd","download_url":"https://codeload.github.com/screwdriver-cd/scm-github/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228106387,"owners_count":17870438,"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":["github"],"created_at":"2024-12-04T12:16:25.421Z","updated_at":"2024-12-04T12:16:26.103Z","avatar_url":"https://github.com/screwdriver-cd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scm-github\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\u003e This scm plugin extends the [scm-base], and provides methods to fetch and update data in github.\n\n## Usage\n\n```bash\nnpm install screwdriver-scm-github\n```\n\n### Initialization\n\nThe class has a variety of knobs to tweak when interacting with GitHub.\n\n| Parameter        | Type  |  Default | Description |\n| :-------------   | :---- | :-------------| :-------------|\n| config        | Object | | Configuration Object |\n| config.gheHost | String | null | If using GitHub Enterprise, the host/port of the deployed instance |\n| config.gheProtocol | String | https | If using GitHub Enterprise, the protocol to use |\n| config.username | String | sd-buildbot | GitHub username for checkout |\n| config.email | String | dev-null@screwdriver.cd | GitHub user email for checkout |\n| config.https | Boolean | false | Is the Screwdriver API running over HTTPS |\n| config.oauthClientId | String | | OAuth Client ID provided by GitHub application |\n| config.oauthClientSecret | String | | OAuth Client Secret provided by GitHub application |\n| config.readOnly | Object | {} | Config with readOnly info: enabled, username, accessToken, cloneType |\n| config.fusebox | Object | {} | [Circuit Breaker configuration][circuitbreaker] |\n| config.secret | String | | Secret to validate the signature of webhook events |\n| config.privateRepo | Boolean | false | Request 'repo' scope, which allows read/write access for public \u0026 private repos\n| config.gheCloud | Boolean |  false | Flag set to true if using Github Enterprise Cloud |\n| [config.gheCloudSlug] | String | null | The Github Enterprise Cloud Slug |\n| [config.gheCloudCookie] | String| null |   The Github Enterprise Cloud Cookie name |\n| [config.gheCloudContext] | String | null |  The Github Enterprise Cloud scm context |\n| config.githubGraphQLUrl | String  | https://api.github.com/graphql |     GraphQL endpoint for GitHub  |\n    \n```js\nconst scm = new GithubScm({\n    oauthClientId: 'abcdef',\n    oauthClientSecret: 'hijklm',\n    secret: 'somesecret'\n});\n```\n\n### Methods\n\n#### getScmContexts\n\nNo parameters are required.\n\n##### Expected Outcome\n\nA single element array of ScmContext(ex: `['github:github.com']`(default), `['github:github.screwdriver.cd']`), which will be a unique identifier for the scm.\n\nFor more information on the exposed methods please see the [scm-base].\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.svg\n[npm-url]: https://npmjs.org/package/screwdriver-scm-github\n[downloads-image]: https://img.shields.io/npm/dt/screwdriver-scm-github.svg\n[license-image]: https://img.shields.io/npm/l/screwdriver-scm-github.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/8/badge\n[status-url]: https://cd.screwdriver.cd/pipelines/8\n[scm-base]: https://github.com/screwdriver-cd/scm-base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrewdriver-cd%2Fscm-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrewdriver-cd%2Fscm-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrewdriver-cd%2Fscm-github/lists"}