{"id":20014678,"url":"https://github.com/willmendesneto/node-github-diff","last_synced_at":"2025-05-04T22:31:13.435Z","repository":{"id":143897611,"uuid":"128200820","full_name":"willmendesneto/node-github-diff","owner":"willmendesneto","description":"Github diffs with Node style 😎","archived":false,"fork":false,"pushed_at":"2025-02-18T08:04:20.000Z","size":555,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-25T04:52:25.925Z","etag":null,"topics":["diff","git","github","github-diffs","hacktoberfest","node-github-diff","nodejs"],"latest_commit_sha":null,"homepage":"","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/willmendesneto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-04-05T12:09:06.000Z","updated_at":"2023-10-20T01:25:13.000Z","dependencies_parsed_at":"2024-11-12T07:26:01.446Z","dependency_job_id":"1964111b-5ebb-401f-b463-ed3f4c639f37","html_url":"https://github.com/willmendesneto/node-github-diff","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willmendesneto%2Fnode-github-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willmendesneto%2Fnode-github-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willmendesneto%2Fnode-github-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willmendesneto%2Fnode-github-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willmendesneto","download_url":"https://codeload.github.com/willmendesneto/node-github-diff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252408109,"owners_count":21743056,"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":["diff","git","github","github-diffs","hacktoberfest","node-github-diff","nodejs"],"created_at":"2024-11-13T07:43:26.080Z","updated_at":"2025-05-04T22:31:13.154Z","avatar_url":"https://github.com/willmendesneto.png","language":"JavaScript","readme":"# node-github-diff\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/willmendesneto/node-github-diff.svg)](https://greenkeeper.io/)\n\n\n[![Build Status](https://circleci.com/gh/willmendesneto/node-github-diff.svg?style=shield)](https://circleci.com/gh/willmendesneto/node-github-diff)\n[![Coverage Status](https://coveralls.io/repos/github/willmendesneto/node-github-diff/badge.svg?branch=master)](https://coveralls.io/github/willmendesneto/node-github-diff?branch=master)\n\n\u003e Github diffs with Node style 😎\n\n[![MIT License][license-badge]][license]\n[![PRs Welcome][prs-badge]][prs]\n[![Watch on GitHub][github-watch-badge]][github-watch]\n[![Star on GitHub][github-star-badge]][github-star]\n[![Tweet][twitter-badge]][twitter]\n\n\nA script to check the diffs between project versions.\n\n## Usage\n\n```js\nconst nodeGithubDiff = require('node-github-diff');\n\n// Using promises\nnodeGithubDiff({\n  repository: 'willmendesneto/generator-update-yeoman-test',\n  base: 'v0.0.3',\n  head: 'v0.0.5',\n})\n.then((gitPatches) =\u003e console.log(gitPatches));\n\n// using async/await\nconst gitPatches = await nodeGithubDiff({\n  repository: 'willmendesneto/generator-update-yeoman-test',\n  base: 'v0.0.3',\n  head: 'v0.0.5',\n});\n\nconsole.log(gitPatches);\n```\n\n\n## Setup\n\n### Private repositories\n\nIn order to use node-github-diff in private repositories you'll need to\n[create a personal access token](https://github.com/settings/tokens)\nwhich has permissions to read private repositories:\n\n![Token permissions](./assets/token.png)\n\nThen, you can pass the github token information in the options object, using the `token` key.\n\n\n```js\nconst nodeGithubDiff = require('node-github-diff');\n...\nnodeGithubDiff({\n  repository: 'willmendesneto/generator-update-yeoman-test',\n  base: 'v0.0.3',\n  head: 'v0.0.5',\n  token: 'your-github-token',\n});\n...\n```\n\n### Run node-github-diff\n\nMake sure you have `npm@\u003e=9.6.7`:\n\n```\nnpm install -g npm@latest\n```\n\nThis package is using `async/await` feature, so please make sure you are using `node@\u003e=v18.0.0` which supports this feature by default based on [Node.green website](https://node.green/). In case you can't please make sure you're running the code with `--harmony-async-await` flag or using solving in your code.\n\n### Parameters\n\n- `repository`: Github repository to be checked;\n- `base`: Package version to use as a starting point to check the diff;\n- `head`: Package version to use as a final point to check the diff;\n- `token`: github token to be used in case of private repositories;\n\n\n## Author\n\n**Wilson Mendes (willmendesneto)**\n+ \u003chttps://twitter.com/willmendesneto\u003e\n+ \u003chttp://github.com/willmendesneto\u003e\n\n\n[license-badge]: https://img.shields.io/badge/license-MIT%20License-blue.svg?style=flat-square\n[license]: https://github.com/willmendesneto/node-github-diff/blob/master/LICENSE\n\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com\n\n[github-watch-badge]: https://img.shields.io/github/watchers/willmendesneto/node-github-diff.svg?style=social\n[github-watch]: https://github.com/willmendesneto/node-github-diff/watchers\n\n[github-star-badge]: https://img.shields.io/github/stars/willmendesneto/node-github-diff.svg?style=social\n[github-star]: https://github.com/willmendesneto/node-github-diff/stargazers\n\n[twitter]: https://twitter.com/intent/tweet?text=Check%20out%20node-github-diff%20by%20@willmendesneto%20https://goo.gl/sqZ8dh%20%F0%9F%91%8D\n[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/willmendesneto/node-github-diff.svg?style=social\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillmendesneto%2Fnode-github-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillmendesneto%2Fnode-github-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillmendesneto%2Fnode-github-diff/lists"}