{"id":15686237,"url":"https://github.com/doowb/github-metadata","last_synced_at":"2025-05-07T18:23:19.374Z","repository":{"id":22239113,"uuid":"94356782","full_name":"doowb/github-metadata","owner":"doowb","description":"Gather GitHub metadata about a repository.","archived":false,"fork":false,"pushed_at":"2021-04-22T03:42:42.000Z","size":135,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T06:17:35.308Z","etag":null,"topics":["blog","gh-pages","github","github-api","github-metadata","github-pages","jekyll","metadata","static","static-site","static-site-generator"],"latest_commit_sha":null,"homepage":"https://github.com/doowb/github-metadata","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doowb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-14T17:34:19.000Z","updated_at":"2025-01-09T14:12:48.000Z","dependencies_parsed_at":"2022-08-07T10:01:39.237Z","dependency_job_id":null,"html_url":"https://github.com/doowb/github-metadata","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fgithub-metadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fgithub-metadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fgithub-metadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doowb%2Fgithub-metadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doowb","download_url":"https://codeload.github.com/doowb/github-metadata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252932208,"owners_count":21827249,"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":["blog","gh-pages","github","github-api","github-metadata","github-pages","jekyll","metadata","static","static-site","static-site-generator"],"created_at":"2024-10-03T17:36:38.931Z","updated_at":"2025-05-07T18:23:19.352Z","avatar_url":"https://github.com/doowb.png","language":"JavaScript","readme":"# github-metadata [![NPM version](https://img.shields.io/npm/v/github-metadata.svg?style=flat)](https://www.npmjs.com/package/github-metadata) [![NPM monthly downloads](https://img.shields.io/npm/dm/github-metadata.svg?style=flat)](https://npmjs.org/package/github-metadata)  [![NPM total downloads](https://img.shields.io/npm/dt/github-metadata.svg?style=flat)](https://npmjs.org/package/github-metadata) [![Linux Build Status](https://img.shields.io/travis/doowb/github-metadata.svg?style=flat\u0026label=Travis)](https://travis-ci.org/doowb/github-metadata) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/github-metadata.svg?style=flat\u0026label=AppVeyor)](https://ci.appveyor.com/project/doowb/github-metadata)\n\n\u003e Gather GitHub metadata about a repository.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save github-metadata\n```\n\nInstall with [yarn](https://yarnpkg.com):\n\n```sh\n$ yarn add github-metadata\n```\n\n## Usage\n\n```js\nvar metadata = require('github-metadata');\n```\n\n## API\n\n### [metadata](index.js#L45)\n\nGather GitHub metadata for the specified repository. This attempts to get the same metadata that's used by Jekyll and specified in the [Github docs](https://help.github.com/articles/repository-metadata-on-github-pages/). Some of the metadata requires authenticating which requires either passing a `username` and `password` or `token` on the `options` object. It's best to use a [personal access token](https://github.com/settings/tokens) from GitHub. See the [results](#results) section to see what the returned metadata object looks like\n\n**Params**\n\n* `options` **{Object}**: Options object containing authentication and repository details.\n* `options.owner` **{String}**: The user or organization that owns the repository. This is the first path segment after \"https://github.com/\".\n* `options.repo` **{String}**: The repository name to get metadata for. This is the second path segment after \"https://github.com/\".\n* `options.exclude` **{Array}**: Optionally pass a list of top-level properties to exclude from the metadata by not downloading it from GitHub.\n* `options.username` **{String}**: Optionally supply a GitHub username for authentication. This is only necessary when using `username/password` for authentication.\n* `options.password` **{String}**: Optionally supply a GitHub password for authentication. This is only necessary when using `username/password` for authentication.\n* `options.token` **{String}**: Optionally supply a GitHub [personal access token](https://github.com/settings/tokens) for authentication. This is only necessary with using oauth (instead of `username/password`) for authentication.\n* `returns` **{Promise}**: Returns a Promise that will have the repositories metadata when resolved.\n\n**Example**\n\n```js\nvar options = {\n  token: 'XXXXXXXXXX' // get this from GitHub,\n  owner: 'doowb',\n  repo: 'github-metadata'\n};\n\nmetadata(options)\n  .then(function(data) {\n    console.log(data);\n    //=\u003e {\n    //=\u003e   // this object contains all of the metadata that was gather from GitHub\n    //=\u003e }\n  })\n  .catch(console.error);\n```\n\n## Results\n\nThe following object represents the GitHub metadata that is returned for the [assemble/assemble](https://github.com/assemble/assemble) repository. The items from the properties that contain long arrays have been removed and replaced with `...`. See the [full JSON object](docs/results.json) and the [GitHub API documentation](https://developer.github.com/v3/) for more information about the items in those arrays.\n\n```js\n{\n  \"public_repositories\": [\n    ...\n  ],\n  \"organization_members\": [\n    ...\n  ],\n  \"contributors\": [\n    ...\n  ],\n  \"collaborators\": [\n    ...\n  ],\n  \"branches\": [\n    ...\n  ],\n  \"languages\": {\n    \"CSS\": 483616,\n    \"JavaScript\": 102873,\n    \"HTML\": 44790\n  },\n  \"teams\": [\n    ...\n  ],\n  \"releases\": [\n    ...\n  ],\n  \"tags\": [\n    ...\n  ],\n  \"repository\": {\n    \"id\": 5916767,\n    \"name\": \"assemble\",\n    \"full_name\": \"assemble/assemble\",\n    \"owner\": {\n      \"login\": \"assemble\",\n      \"id\": 2645080,\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/2645080?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/assemble\",\n      \"html_url\": \"https://github.com/assemble\",\n      \"followers_url\": \"https://api.github.com/users/assemble/followers\",\n      \"following_url\": \"https://api.github.com/users/assemble/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/assemble/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/assemble/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/assemble/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/assemble/orgs\",\n      \"repos_url\": \"https://api.github.com/users/assemble/repos\",\n      \"events_url\": \"https://api.github.com/users/assemble/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/assemble/received_events\",\n      \"type\": \"Organization\",\n      \"site_admin\": false\n    },\n    \"private\": false,\n    \"html_url\": \"https://github.com/assemble/assemble\",\n    \"description\": \"Static site generator and rapid prototyping framework for Node.js, Grunt.js, and Yeoman and Gulp. Render templates with Handlebars, Lo-Dash or any template engine. Used by Less.js / lesscss.org, Topcoat, Web Experience Toolkit, and hundreds of other projects to build sites, themes, components, documentation, blogs and gh-pages.\",\n    \"fork\": false,\n    \"url\": \"https://api.github.com/repos/assemble/assemble\",\n    \"forks_url\": \"https://api.github.com/repos/assemble/assemble/forks\",\n    \"keys_url\": \"https://api.github.com/repos/assemble/assemble/keys{/key_id}\",\n    \"collaborators_url\": \"https://api.github.com/repos/assemble/assemble/collaborators{/collaborator}\",\n    \"teams_url\": \"https://api.github.com/repos/assemble/assemble/teams\",\n    \"hooks_url\": \"https://api.github.com/repos/assemble/assemble/hooks\",\n    \"issue_events_url\": \"https://api.github.com/repos/assemble/assemble/issues/events{/number}\",\n    \"events_url\": \"https://api.github.com/repos/assemble/assemble/events\",\n    \"assignees_url\": \"https://api.github.com/repos/assemble/assemble/assignees{/user}\",\n    \"branches_url\": \"https://api.github.com/repos/assemble/assemble/branches{/branch}\",\n    \"tags_url\": \"https://api.github.com/repos/assemble/assemble/tags\",\n    \"blobs_url\": \"https://api.github.com/repos/assemble/assemble/git/blobs{/sha}\",\n    \"git_tags_url\": \"https://api.github.com/repos/assemble/assemble/git/tags{/sha}\",\n    \"git_refs_url\": \"https://api.github.com/repos/assemble/assemble/git/refs{/sha}\",\n    \"trees_url\": \"https://api.github.com/repos/assemble/assemble/git/trees{/sha}\",\n    \"statuses_url\": \"https://api.github.com/repos/assemble/assemble/statuses/{sha}\",\n    \"languages_url\": \"https://api.github.com/repos/assemble/assemble/languages\",\n    \"stargazers_url\": \"https://api.github.com/repos/assemble/assemble/stargazers\",\n    \"contributors_url\": \"https://api.github.com/repos/assemble/assemble/contributors\",\n    \"subscribers_url\": \"https://api.github.com/repos/assemble/assemble/subscribers\",\n    \"subscription_url\": \"https://api.github.com/repos/assemble/assemble/subscription\",\n    \"commits_url\": \"https://api.github.com/repos/assemble/assemble/commits{/sha}\",\n    \"git_commits_url\": \"https://api.github.com/repos/assemble/assemble/git/commits{/sha}\",\n    \"comments_url\": \"https://api.github.com/repos/assemble/assemble/comments{/number}\",\n    \"issue_comment_url\": \"https://api.github.com/repos/assemble/assemble/issues/comments{/number}\",\n    \"contents_url\": \"https://api.github.com/repos/assemble/assemble/contents/{+path}\",\n    \"compare_url\": \"https://api.github.com/repos/assemble/assemble/compare/{base}...{head}\",\n    \"merges_url\": \"https://api.github.com/repos/assemble/assemble/merges\",\n    \"archive_url\": \"https://api.github.com/repos/assemble/assemble/{archive_format}{/ref}\",\n    \"downloads_url\": \"https://api.github.com/repos/assemble/assemble/downloads\",\n    \"issues_url\": \"https://api.github.com/repos/assemble/assemble/issues{/number}\",\n    \"pulls_url\": \"https://api.github.com/repos/assemble/assemble/pulls{/number}\",\n    \"milestones_url\": \"https://api.github.com/repos/assemble/assemble/milestones{/number}\",\n    \"notifications_url\": \"https://api.github.com/repos/assemble/assemble/notifications{?since,all,participating}\",\n    \"labels_url\": \"https://api.github.com/repos/assemble/assemble/labels{/name}\",\n    \"releases_url\": \"https://api.github.com/repos/assemble/assemble/releases{/id}\",\n    \"deployments_url\": \"https://api.github.com/repos/assemble/assemble/deployments\",\n    \"created_at\": \"2012-09-22T20:50:23Z\",\n    \"updated_at\": \"2017-06-15T01:09:31Z\",\n    \"pushed_at\": \"2017-05-20T00:33:33Z\",\n    \"git_url\": \"git://github.com/assemble/assemble.git\",\n    \"ssh_url\": \"git@github.com:assemble/assemble.git\",\n    \"clone_url\": \"https://github.com/assemble/assemble.git\",\n    \"svn_url\": \"https://github.com/assemble/assemble\",\n    \"homepage\": \"http://assemble.io/\",\n    \"size\": 13050,\n    \"stargazers_count\": 3350,\n    \"watchers_count\": 3350,\n    \"language\": \"CSS\",\n    \"has_issues\": true,\n    \"has_projects\": true,\n    \"has_downloads\": true,\n    \"has_wiki\": true,\n    \"has_pages\": false,\n    \"forks_count\": 225,\n    \"mirror_url\": null,\n    \"open_issues_count\": 26,\n    \"forks\": 225,\n    \"open_issues\": 26,\n    \"watchers\": 3350,\n    \"default_branch\": \"master\",\n    \"permissions\": {\n      \"admin\": true,\n      \"push\": true,\n      \"pull\": true\n    },\n    \"allow_squash_merge\": true,\n    \"allow_merge_commit\": true,\n    \"allow_rebase_merge\": true,\n    \"organization\": {\n      \"login\": \"assemble\",\n      \"id\": 2645080,\n      \"avatar_url\": \"https://avatars3.githubusercontent.com/u/2645080?v=3\",\n      \"gravatar_id\": \"\",\n      \"url\": \"https://api.github.com/users/assemble\",\n      \"html_url\": \"https://github.com/assemble\",\n      \"followers_url\": \"https://api.github.com/users/assemble/followers\",\n      \"following_url\": \"https://api.github.com/users/assemble/following{/other_user}\",\n      \"gists_url\": \"https://api.github.com/users/assemble/gists{/gist_id}\",\n      \"starred_url\": \"https://api.github.com/users/assemble/starred{/owner}{/repo}\",\n      \"subscriptions_url\": \"https://api.github.com/users/assemble/subscriptions\",\n      \"organizations_url\": \"https://api.github.com/users/assemble/orgs\",\n      \"repos_url\": \"https://api.github.com/users/assemble/repos\",\n      \"events_url\": \"https://api.github.com/users/assemble/events{/privacy}\",\n      \"received_events_url\": \"https://api.github.com/users/assemble/received_events\",\n      \"type\": \"Organization\",\n      \"site_admin\": false\n    },\n    \"network_count\": 225,\n    \"subscribers_count\": 121\n  },\n  \"pages_info\": {\n    \"message\": \"Not Found\",\n    \"documentation_url\": \"https://developer.github.com/v3\"\n  },\n  \"pages\": {\n    \"env\": \"development\",\n    \"test\": false,\n    \"dotcom\": false,\n    \"enterprise\": false,\n    \"development\": true,\n    \"ssl\": false,\n    \"schema\": \"http\",\n    \"custom_domains_enabled\": false,\n    \"github_hostname\": \"github.com\",\n    \"pages_hostname\": \"localhost:4000\",\n    \"github_url\": \"http://github.com\",\n    \"api_url\": \"https://api.github.com\",\n    \"help_url\": \"https://help.github.com\"\n  },\n  \"hostname\": \"github.com\",\n  \"pages_hostname\": \"localhost:4000\",\n  \"api_url\": \"https://api.github.com\",\n  \"help_url\": \"https://help.github.com\",\n  \"environment\": \"development\",\n  \"pages_env\": \"development\",\n  \"url\": \"https://github.com/assemble/assemble\",\n  \"project_title\": \"assemble\",\n  \"repository_name\": \"assemble\",\n  \"repository_nwo\": \"assemble/assemble\",\n  \"project_tagline\": \"Static site generator and rapid prototyping framework for Node.js, Grunt.js, and Yeoman and Gulp. Render templates with Handlebars, Lo-Dash or any template engine. Used by Less.js / lesscss.org, Topcoat, Web Experience Toolkit, and hundreds of other projects to build sites, themes, components, documentation, blogs and gh-pages.\",\n  \"owner_name\": \"assemble\",\n  \"owner_gravatar_url\": \"http://github.com/assemble.png}\",\n  \"repository_url\": \"https://github.com/assemble/assemble\",\n  \"language\": \"CSS\",\n  \"show_downloads\": true,\n  \"owner_url\": \"http://github.com/assemble\",\n  \"zip_url\": \"http://github.com/assemble/assemble/zipball/gh_pages\",\n  \"tar_url\": \"http://github.com/assemble/assemble/tarball/gh_pages\",\n  \"clone_url\": \"http://github.com/assemble/assemble.git\",\n  \"releases_url\": \"http://github.com/assemble/assemble/releases\",\n  \"issues_url\": \"http://github.com/assemble/assemble/issues\",\n  \"wiki_url\": \"http://github.com/assemble/assemble/wiki\",\n  \"is_user_page\": false,\n  \"is_project_page\": true\n}\n```\n\n## About\n\n### Related projects\n\n* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble \"Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit\")\n* [github-base](https://www.npmjs.com/package/github-base): JavaScript wrapper that greatly simplifies working with GitHub's API. | [homepage](https://github.com/jonschlinkert/github-base \"JavaScript wrapper that greatly simplifies working with GitHub's API.\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n### Building docs\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Brian Woodward**\n\n* [github/doowb](https://github.com/doowb)\n* [twitter/doowb](https://twitter.com/doowb)\n\n### License\n\nCopyright © 2017, [Brian Woodward](https://doowb.com).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 21, 2017._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fgithub-metadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoowb%2Fgithub-metadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoowb%2Fgithub-metadata/lists"}