Ever wonder who's contributed to a specific file on github? file-contributors gives you simple way to get all contributors to a specific file on Github.
🤖 See over-engineered demo on codesandbox
Install file-contributors from npm
npm install file-contributors --savefile-contributors exports function that accepts 3 arguments.
ownerOwner of the github repository. This could be your username or organization name- type:
String
- type:
repoName of the repository- type:
String
- type:
pathLocation of the file relative to the repository root.- type:
String
- type:
importgetFileContributorsfrom'file-contributors'constfile={owner: 'codebender828',repo: 'file-contributors',path: 'README.md'}constcontributors=getFileContributors(file.owner,file.repo,file.path).then(contributors=>{console.log(contributors)// Logs array of contributors to file.})If you like this project, please consider supporting it by buying my a coffee!

Made with ❤️ by Jonathan Bakebwa 🇺🇬