{"id":18689483,"url":"https://github.com/joakimbeng/git-affected-files","last_synced_at":"2026-04-13T17:33:45.431Z","repository":{"id":143879814,"uuid":"78624069","full_name":"joakimbeng/git-affected-files","owner":"joakimbeng","description":"Get affected files in a git commit","archived":false,"fork":false,"pushed_at":"2017-01-11T10:24:56.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T11:59:47.550Z","etag":null,"topics":["changed-file","commits","git","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joakimbeng.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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-01-11T09:35:56.000Z","updated_at":"2017-01-11T09:42:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9201b8e-239e-4657-a85b-f94aa4cb2242","html_url":"https://github.com/joakimbeng/git-affected-files","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/joakimbeng/git-affected-files","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joakimbeng%2Fgit-affected-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joakimbeng%2Fgit-affected-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joakimbeng%2Fgit-affected-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joakimbeng%2Fgit-affected-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joakimbeng","download_url":"https://codeload.github.com/joakimbeng/git-affected-files/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joakimbeng%2Fgit-affected-files/sbom","scorecard":{"id":525471,"data":{"date":"2025-08-11","repo":{"name":"github.com/joakimbeng/git-affected-files","commit":"e8abfd6b7322d195442385adb65c616ebce56767"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T04:14:18.082Z","repository_id":143879814,"created_at":"2025-08-20T04:14:18.083Z","updated_at":"2025-08-20T04:14:18.083Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31762597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["changed-file","commits","git","nodejs"],"created_at":"2024-11-07T10:43:54.106Z","updated_at":"2026-04-13T17:33:45.395Z","avatar_url":"https://github.com/joakimbeng.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-affected-files\n\n[![Build status][travis-image]][travis-url] [![NPM version][npm-image]][npm-url] [![XO code style][codestyle-image]][codestyle-url]\n\n\u003e Get affected files in a git commit\n\n## Installation\n\nInstall `git-affected-files` using [npm](https://www.npmjs.com/):\n\n```bash\nnpm install --save git-affected-files\n```\n\n## Usage\n\n### Module usage\n\n```javascript\nconst gitAffectedFiles = require('git-affected-files');\n\n// Get affected files for last commit\ngitAffectedFiles()\n\t.then(files =\u003e {\n\t\tconsole.log(files);\n\t\t/*\n\t\t  [\n\t\t    {status: 'A', filename: 'a/new/file'},\n\t\t    {status: 'M', filename: 'a/modified/file'},\n\t\t    {status: 'D', filename: 'a/deleted/file'},\n\t\t  ]\n\t\t*/\n\t});\n\t\n// Get affected files for specific commit:\ngitAffectedFiles('6ba8b08')\n\t.then(files =\u003e {\n\t\tconsole.log(files);\n\t\t/*\n\t\t  [\n\t\t    {status: 'A', filename: '.editorconfig'},\n\t\t    {status: 'A', filename: '.gitignore'},\n\t\t    ...\n\t\t  ]\n\t\t*/\n\t});\n```\n\n## API\n\n### `gitAffectedFiles([hash] [, options])`\n\n| Name | Type | Description |\n|------|------|-------------|\n| hash | `String` | Git commit sha hash string |\n| options | `Object` | Provided options are passed to [`execa`](https://github.com/sindresorhus/execa), used to set `cwd` and similar |\n\nReturns: `Promise\u003cArray\u003cObject\u003e\u003e`\n\n## License\n\nMIT © [Joakim Carlstein](http://joakim.beng.se)\n\n[npm-url]: https://npmjs.org/package/git-affected-files\n[npm-image]: https://badge.fury.io/js/git-affected-files.svg\n[travis-url]: https://travis-ci.org/joakimbeng/git-affected-files\n[travis-image]: https://travis-ci.org/joakimbeng/git-affected-files.svg?branch=master\n[codestyle-url]: https://github.com/sindresorhus/xo\n[codestyle-image]: https://img.shields.io/badge/code%20style-XO-5ed9c7.svg?style=flat\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoakimbeng%2Fgit-affected-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoakimbeng%2Fgit-affected-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoakimbeng%2Fgit-affected-files/lists"}