{"id":20720174,"url":"https://github.com/scalajs-io/github-api-node","last_synced_at":"2026-04-10T12:05:15.682Z","repository":{"id":77422525,"uuid":"82256173","full_name":"scalajs-io/github-api-node","owner":"scalajs-io","description":"A higher-level wrapper around the Github API.","archived":false,"fork":false,"pushed_at":"2019-06-17T23:08:57.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-17T22:42:43.419Z","etag":null,"topics":["github","node","nodejs","npm","npm-module","npm-package","scala","scalajs"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scalajs-io.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":"2017-02-17T04:11:33.000Z","updated_at":"2019-06-17T23:08:59.000Z","dependencies_parsed_at":"2023-09-06T15:49:02.241Z","dependency_job_id":null,"html_url":"https://github.com/scalajs-io/github-api-node","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalajs-io%2Fgithub-api-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalajs-io%2Fgithub-api-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalajs-io%2Fgithub-api-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalajs-io%2Fgithub-api-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scalajs-io","download_url":"https://codeload.github.com/scalajs-io/github-api-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242995884,"owners_count":20218815,"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","node","nodejs","npm","npm-module","npm-package","scala","scalajs"],"created_at":"2024-11-17T03:19:33.730Z","updated_at":"2025-12-31T00:49:30.769Z","avatar_url":"https://github.com/scalajs-io.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"GitHub API for Scala.js\n================================\n[github-api-node](https://www.npmjs.com/package/github-api-node) - A higher-level wrapper around the Github API.\n\n### Description\n\nGithub.js provides a minimal higher-level wrapper around git's plumbing commands, exposing an API for \nmanipulating GitHub repositories on the file level. It was formerly developed in the context of Prose, \na content editor for GitHub.\n\n### Build Dependencies\n\n\n* [SBT v1.2.x](http://www.scala-sbt.org/download.html)\n\n### Build/publish the SDK locally\n\n```bash\n $ sbt clean publish-local\n```\n\n### Running the tests\n\nBefore running the tests the first time, you must ensure the npm packages are installed:\n\n```bash\n$ npm install\n```\n\nThen you can run the tests:\n\n```bash\n$ sbt test\n```\n\n### Examples\n\n```scala\nimport io.scalajs.nodejs.util.Util\nimport io.scalajs.npm.githubapinode._\nimport io.scalajs.util.JSONHelper._\nimport scala.scalajs.concurrent.JSExecutionContext.Implicits.queue\nimport scala.scalajs.js\n\nval gitHub = new GitHub(new GithubOptions())\n\n// get the \"bignum\" repo for user \"scalajs-io\"\nval repo = gitHub.getRepo(\"scalajs-io\", \"bignum\")\n\n// list the branches in the repo\nrepo.listBranchesFuture foreach { branches =\u003e\n  println(s\"branches: ${branches.toJson}\")\n}\n\n// list the contributors to the repo  \nrepo.contributorsFuture foreach { contributors =\u003e\n  println(s\"contributors: ${Util.inspect(contributors)}\")\n}\n\n// retrieve the contents of the master branch\nrepo.contentsFuture(branch = \"master\", pathToDir = \".\") foreach { contents =\u003e\n  println(s\"contents: ${Util.inspect(contents)}\")\n}\n\n// asynchronously read the contents of a file in the repo's master branch\nrepo.readFuture(branch = \"master\", pathToFile = \"package.json\") foreach { data =\u003e\n  println(s\"package.json: ${Util.inspect(data)}\")\n}\n```\n\n### Artifacts and Resolvers\n\nTo add the `GitHub` binding to your project, add the following to your build.sbt:  \n\n```sbt\nlibraryDependencies += \"io.scalajs.npm\" %%% \"github-api-node\" % \"0.5.0\"\n```\n\nOptionally, you may add the Sonatype Repository resolver:\n\n```sbt   \nresolvers += Resolver.sonatypeRepo(\"releases\") \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalajs-io%2Fgithub-api-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscalajs-io%2Fgithub-api-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalajs-io%2Fgithub-api-node/lists"}