{"versions":{"1.0.0":{"name":"@snyk/github-codeowners","description":"Handy tool for working with file ownership using Githubs CODEOWNERS file","main":"dist/cli.js","scripts":{"prepare":"npm run build","build":"tsc","cli":"ts-node --transpile-only src/cli.ts","cli:dist":"tsc && node dist/cli.js","test":"jest","pretest:int":"rm -rf tests/scratch","test:int":"env JEST_JUNIT_OUTPUT_DIR=./tests/reports/int jest --testMatch  **/*.test.int.ts --ci"},"author":{"name":"snyk.io"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/snyk/github-codeowners.git"},"dependencies":{"commander":"^4.1.1","ignore":"^5.1.8","p-map":"^4.0.0"},"devDependencies":{"@types/jest":"^27.4.0","@types/node":"^13.7.6","@types/uuid":"^8.0.0","jest":"^27.4.7","jest-junit":"^11.0.1","ts-jest":"^27.1.3","ts-node":"^8.6.2","typescript":"~3.8.3","uuid":"^8.2.0"},"release":{"branches":["main"]},"bin":{"github-codeowners":"dist/cli.js"},"engines":{"node":">=8.10"},"version":"1.0.0","gitHead":"ef8b29a2de9b387ee5c18d58e3054e4eafc09f7e","bugs":{"url":"https://github.com/snyk/github-codeowners/issues"},"homepage":"https://github.com/snyk/github-codeowners#readme","_id":"@snyk/github-codeowners@1.0.0","_nodeVersion":"14.19.3","_npmVersion":"6.14.17","dist":{"integrity":"sha512-6xJbeuNi8gjjCOFBQhAa1XH9NPskfq4mDQOqsLdY9DkyeFNI6MGpWAzUsJf1r5QU5WkuUzsTD7SWPX2MviSEbw==","shasum":"d5fd086228272af26fa5eec97579107c1d0ca4b0","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@snyk/github-codeowners/-/github-codeowners-1.0.0.tgz","fileCount":76,"unpackedSize":112057,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqyvhdqVYEijyH83F95u0VGfGWRCwWkWyXIyHthScFCQIhANup1HIXltoOiL5fiq1MHR/4nGRu2uaAllW1Zkxz3EyE"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJipxeuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo1Dw//RmbLsLWQZyJnpNA5PHWwyeKswMVazoOjmFnArQEk2ovo1l2R\r\nAMp648xSAD96fiHGTlQmuF9WzjOSg+cKxJVU2kjNb6Lh0FUxMIRp2PtqNkmC\r\n00zPKWFsAdOggZwM+0RAV6BxQ9MTyVq/x6AFlFwJVK29WJeBXiLS59Ot9jAy\r\nm8qigeeBc1j7QFQYf6h9gq1A2i1ms1omhIr5xs7XXICtGzMO4djXz8PMZCQ7\r\nrIvzg/KZkAtUo+p79q9OiNSn1otv4HxqjAHdBJR/0D1o1g5vOh/FltJBwhDK\r\nUs9VJ9aREMZCXVXC/WdUvy2U3MIuNI6C0os+CENpuZLvF5CAB4ON0xTOIfFQ\r\n5JDYwgwIkIxenUvMV0YHMfuUzCOydFzw+/fs1i5Svwv0kbxaR0alNMf2XcBk\r\nVu5o1yBfDD+ssXFoykDOJL/zHaIXFI5sJReRWIRpucqDE06GxifA/IDOss2e\r\n4Z+FAL/5HMIvzmfWDIAhWBsqD0DH7TPcXdAxN6m32JjuKPnuPPf6s7WaK9C9\r\ntxOc3BxhZl+bRTrLR7Q0Z3rvGGJnuhrAaMVkRnWvI1PcnjsPdLa7DkhSysPv\r\nzs7p4wSaxAy1KjqhQnjrh8Vvzv3ZkbohuHn0+7qYp6Xk72ge3rIVMS1PEJTG\r\nnwzTnTtvvDm8Beo0b5iTSunU3Mhygo2CNQA=\r\n=6Wih\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anonymous","email":"npmjs+snyk-admin@snyk.io"},"directories":{},"maintainers":[{"name":"anonymous","email":"npmjs+snyk-admin@snyk.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/github-codeowners_1.0.0_1655117741844_0.3927583580570051"},"_hasShrinkwrap":false,"contributors":[]},"1.1.0":{"name":"@snyk/github-codeowners","description":"Handy tool for working with file ownership using Githubs CODEOWNERS file","main":"dist/cli.js","scripts":{"prepare":"npm run build","build":"tsc","cli":"ts-node --transpile-only src/cli.ts","cli:dist":"tsc && node dist/cli.js","test":"jest","pretest:int":"rm -rf tests/scratch","test:int":"env JEST_JUNIT_OUTPUT_DIR=./tests/reports/int jest --testMatch  **/*.test.int.ts --ci"},"author":{"name":"snyk.io"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/snyk/github-codeowners.git"},"dependencies":{"commander":"^4.1.1","ignore":"^5.1.8","p-map":"^4.0.0"},"devDependencies":{"@types/jest":"^27.4.0","@types/node":"^13.7.6","@types/uuid":"^8.0.0","jest":"^27.4.7","jest-junit":"^11.0.1","ts-jest":"^27.1.3","ts-node":"^8.6.2","typescript":"~3.8.3","uuid":"^8.2.0"},"release":{"branches":["main"]},"bin":{"github-codeowners":"dist/cli.js"},"engines":{"node":">=8.10"},"version":"1.1.0","gitHead":"375f896d8cc72b7ac99401e3d925970a1ac6900e","bugs":{"url":"https://github.com/snyk/github-codeowners/issues"},"homepage":"https://github.com/snyk/github-codeowners#readme","_id":"@snyk/github-codeowners@1.1.0","_nodeVersion":"14.19.3","_npmVersion":"6.14.17","dist":{"integrity":"sha512-lGFf08pbkEac0NYgVf4hdANpAgApRjNByLXB+WBip3qj1iendOIyAwP2GKkKbQMNVy2r1xxDf0ssfWscoiC+Vw==","shasum":"45b99732c3c38b5f5b47e43d2b0c9db67a6d2bcc","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@snyk/github-codeowners/-/github-codeowners-1.1.0.tgz","fileCount":78,"unpackedSize":116063,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCwVVsDyzLeiyMO5dKQpW1a4h/I7lvror9buMGnaLScQIgLH9Ud9WQUA6LN0m8aewYcOxB73c+w8dV0mfz+euqqPk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjx4dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqKVQ//bq0CFpwG+F8E/OS1AED0Nh/JtoQPGpjh1UVTO+HqAwIU4/rO\r\nj8YX4ryqXEzRxyF1e6RO7h4C8UdPHih3q9vOOvTcEPRgb15gdO4Lq2DiNFY0\r\nqpxKyOsylQRKubHd3yqhZuWUvEaM3A3Qh/ZxBwdSSVwu7vBZ3WXoSeI8B53o\r\ndN2wOhAJXtT1MW9prf5w2mIjK4eZ7Zk+9unjwih5WEHseALqJq3jdFH3VPb+\r\nhPoJXlYFkNjIfOrd7IEVBc46pBA3r9HWAMKxOTWRuYy/n42/Bs0LKxalDwbu\r\n8t4zggxLYYcH4WkVKytKH9n0f+rQyHjBuwMq307RAcdm/gptKDvjzivYa5fJ\r\n/iIU0oXnZYJad1MrnhlqRun8bClPisTCx+VkAiffIuauBuSv6EiQ4ji3ZHH8\r\nDb0PttPEAaAHpfbeHe2uJNnIKYSK0uILH/kDzOsdHkPx9D+Mr9FQZSQWOst7\r\nwJMwUulgbGkeKTL7xU+xpKN8SkVt/PXLW1O/gzOQHfxriUFB5V7X/QVbE5db\r\ncyKpgtnQLixOS8//PWylCHnJRMC4ta/kbZrENs8fqQp/xfrZIPrsoYUUUBxp\r\nE+1Yjxwv1PSSli4nXio8GBdbMUlAYBz8sjR/yTwBnDR5kWL/w/hi8a8HppXE\r\nwD53cXJzbnT/yoAbWdKj5lHr+Ekvzu+IJfw=\r\n=gks6\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anonymous","email":"npmjs+snyk-admin@snyk.io"},"directories":{},"maintainers":[{"name":"anonymous","email":"npmjs+snyk-admin@snyk.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/github-codeowners_1.1.0_1670323741742_0.11916574681006753"},"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"1.1.0"},"name":"@snyk/github-codeowners","time":{"created":"2022-06-13T15:20:32.436Z","1.0.0":"2022-06-13T10:55:42.002Z","modified":"2022-12-06T10:54:25.979Z","1.1.0":"2022-12-06T10:49:01.943Z"},"readme":"# github-codeowners\n[![Maintainability](https://api.codeclimate.com/v1/badges/005e2a8038aa060010dd/maintainability)](https://codeclimate.com/github/jjmschofield/github-codeowners/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/005e2a8038aa060010dd/test_coverage)](https://codeclimate.com/github/jjmschofield/github-codeowners/test_coverage)\n[![CircleCI](https://circleci.com/gh/jjmschofield/github-codeowners/tree/master.svg?style=shield)](https://circleci.com/gh/jjmschofield/github-codeowners/tree/master)\n[![Known Vulnerabilities](https://snyk.io/test/github/jjmschofield/github-codeowners/badge.svg?targetFile=package.json)](https://snyk.io/test/github/jjmschofield/github-codeowners?targetFile=package.json)\n\nA CLI tool for working with GitHub CODEOWNERS.\n\nThings it does:\n* Calculate ownership stats\n* Find out who owns each and every file (ignoring files listed in `.gitignore`)\n* Find out who owns a single file\n* Find out who owns your staged files\n* Outputs in a bunch of script friendly handy formats for integrations (CSV and JSONL)\n* Validates that your CODEOWNERS file is valid\n\n## Installation\nInstall via npm globally then run\n\n```shell script\n$ npm i -g github-codeowners\n$ github-codeowners --help \nUsage: github-codeowners [options] [command]\n```\n\n## Commands\n### Audit\nCompares every file in your current (or specified) directory against your CODEOWNERS rules and outputs the result of who owns each file.\n```shell script\n$ cd <your awesome project> \n$ github-codeowners audit\nREADME.md\npackage.json\nsrc/cli.ts      @jjmschofield\n...\n```\n\nOwnership stats:\n```shell script\n$ github-codeowners audit -s\n--- Counts ---\nTotal: 24 files (1378 lines) 100%\nLoved: 10 files (494 lines) 41.6%\nUnloved: 14 files (884 lines) 58.4%\n--- Owners ---\n@jjmschofield: 10 files (494 lines) 41.6%\n```\n\nOnly files in a specific directory:\n```shell script\n$ github-codeowners audit -r src/\nsrc/cli.ts      @jjmschofield\nsrc/commands/audit.ts   @jjmschofield\n...\n```\n\nOnly unowned files:\n```shell script\n$ github-codeowners audit -u\n.github/CODEOWNERS\n.gitignore\n```\n\nOutput in JSONL:\n```shell script\n$ github-codeowners audit -o jsonl\n{\"path\":\"src/commands/audit.ts\",\"owners\":[\"@jjmschofield\"],\"lines\":48}\n...\n```\n\nOutput in CSV:\n```shell script\n$ github-codeowners audit -o csv\nsrc/commands/audit.ts,@jjmschofield\n```\n\nFull usage information:\n```shell script\n$ github-codeowners audit --help\nUsage: github-codeowners audit [options]\n\nlist the owners for all files\n\nOptions:\n  -d, --dir <dirPath>          path to VCS directory (default: \"<current working directory>\")\n  -c, --codeowners <filePath>  path to codeowners file (default: \"<dir>/.github/CODEOWNERS\")\n  -o, --output <outputFormat>  how to output format eg: simple, jsonl, csv (default: \"simple\")\n  -u, --unloved                unowned files only (default: false)\n  -g, --only-git               consider only files tracked by git (default: false)\n  -s, --stats                  output stats (default: true)\n  -r, --root <rootPath>        the root path to filter files by (default: \"\")\n  -h, --help                   output usage information\n```\n\n### Who\nTells you who owns a given file or files: \n```shell script\n$ cd <your awesome project> \n$ github-codeowners who <file> <file>\n<file> @some/team\n<file> @some/team\n```\n\nFull usage:\n```shell script\n$ github-codeowners who --help                   \nUsage: github-codeowners who [options] <file...>\n\nlists owners of a specific file or files\n\nOptions:\n  -d, --dir <dirPath>          path to VCS directory (default: \"/Users/jjmschofield/projects/github/snyk/registry\")\n  -c, --codeowners <filePath>  path to codeowners file (default: \"<dir>/.github/CODEOWNERS\")\n  -o, --output <outputFormat>  how to output format eg: simple, jsonl, csv (default: \"simple\")\n  -h, --help                   output usage information\n```\n\n### Git\nProvides a list of files with their owners between commits (against the **current** version of CODEOWNERS).\n\nOwnership of all files staged for commit:\n```shell script\n$ cd <your awesome project>\n$ github-codeowners git\n```\n\nOwnership of files existing at a specific commit:\n```shell script\n$ github-codeowners git <commit sha>\n```\n\nOwnership of files changed between two commits:\n```shell script\n$ github-codeowners git <commit sha> <commit sha>\n```\n\nOutput stats:\n```shell script\n$ github-codeowners git -s\n```\n\nFull usage:\n```shell script\n$ github-codeowners git --help                                                                                       \nUsage: github-codeowners git [options] [shaA] [shaB]\n\nlists owners of files changed between commits, a commit against head or staged against head.\n\nOptions:\n  -d, --dir <dirPath>          path to VCS directory (default: \"/Users/jjmschofield/projects/github/snyk/registry\")\n  -c, --codeowners <filePath>  path to codeowners file (default: \"<dir>/.github/CODEOWNERS\")\n  -o, --output <outputFormat>  how to output format eg: simple, jsonl, csv (default: \"simple\")\n  -s, --stats                  output stats, note line counts are not available for this command (default: false)\n  -h, --help                   output usage information\n```\n\n### Validate\nValidates your CODEOWNERS file to find common mistakes, will throw on errors (such as malformed owners).\n```shell script\n$ cd <your awesome project> \n$ github-codeowners validate\nFound duplicate rules [ 'some/duplicate/rule @octocat' ]\nFound rules which did not match any files [ 'some/non-existent/path @octocat' ]\n...\n```\n\nFull usage information:\n```shell script\n$ github-codeowners validate --help\nUsage: github-codeowners validate [options]\n\nValidates a CODOWNER file and files in dir\n\nOptions:\n  -d, --dir <dirPath>          path to VCS directory (default: \"<current working directory>\")\n  -c, --codeowners <filePath>  path to codeowners file (default: \"<dir>/.github/CODEOWNERS\")\n  -r, --root <rootPath>        the root path to filter files by (default: \"\")\n  -h, --help                   output usage information\n```\n\n## Output Formats\nCheck `github-codeowners <command> --help` for support for a given command, however generally the following outputs are supported:\n* `simple` - tab delimited - terminal friendly output\n* `jsonl` - line separated json - useful for streaming data to another command\n* `csv` - csv delimited fields - useful to import into a spreadsheet tool of your choice\n\n## Limits and Things to Improve\n* It requires node\n* It is not optimized\n* The output interface might change\n* Command syntax might change\n\n## Shout outs\nInspired by [codeowners](https://github.com/beaugunderson/codeowners#readme) but implemented in Typescript with extra bells and whistles.\n\nThis project is a fork of [jjmschofield's version](https://github.com/jjmschofield/github-codeowners).","users":{}}