{"_id":"@cogniwave/gh-sync","_rev":"3-2080298cbb7354610ee3bd5c153e9517","name":"@cogniwave/gh-sync","dist-tags":{"latest":"1.1.3"},"versions":{"1.1.0":{"name":"@cogniwave/gh-sync","version":"1.1.0","keywords":["github","devtools","typescript","bun"],"author":{"url":"https://cogniwave.pt","name":"Tiago Ribeiro","email":"tiago.ribeiro@cogniwave.pt"},"license":"AGPL-3.0-only","_id":"@cogniwave/gh-sync@1.1.0","maintainers":[{"name":"ribeiro-tiago","email":"tiagoribeiro.1803@gmail.com"}],"homepage":"https://cogniwave.gitbook.io/gh-sync","bugs":{"url":"https://github.com/cogniwave/gh-sync/issues"},"dist":{"shasum":"433b6f8b51a62907b553fec8f0b6938a695ce648","tarball":"https://registry.npmjs.org/@cogniwave/gh-sync/-/gh-sync-1.1.0.tgz","fileCount":8,"integrity":"sha512-xAmPPMo1w7QmCG5yS5tBNnkVTsvtSvN77yG+JJUL9K6DXuKcDHZONDYnsHipYgM40z4t94ypTfMm534iB87otw==","signatures":[{"sig":"MEQCIFqXGGWeybuqzZtiCYwhTXPWsZ+5TH1EQSdmuZ21D8mLAiB8hyfNld+TJNwlbZk8wQlTvEklDrALWbRA95l755HDaA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16913},"main":"./dist/app.js","type":"module","types":"./dist/types.d.ts","engines":{"node":">= 23.10.0"},"gitHead":"f6dffe952cdc07f4452332b8c9fc5b7d6581a5e0","scripts":{"dev":"bun run src/app.ts","build":"tsc","release":"bun run build && bun changelogen --release --publish --push","release:beta":"bun run build && bun changelogen --publishTag rc --prerelease --nameSuffix rc --push"},"_npmUser":{"name":"ribeiro-tiago","email":"tiagoribeiro.1803@gmail.com"},"repository":{"url":"git+https://github.com/cogniwave/gh-sync.git","type":"git"},"_npmVersion":"10.9.2","description":"This tool allows you to synchronize configurations (labels, workflows, rules, etc) between two GitHub repositories","directories":{},"_nodeVersion":"23.10.0","dependencies":{"commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.2.5","devDependencies":{"consola":"^3.4.2","@types/bun":"latest","changelogen":"^0.6.1","@eslint/eslintrc":"^3.3.1","eslint-config-prettier":"^10.1.1","@typescript-eslint/parser":"^8.28.0","@commander-js/extra-typings":"^13.1.0","@typescript-eslint/eslint-plugin":"^8.28.0"},"peerDependencies":{"typescript":"^5.8.2"},"_npmOperationalInternal":{"tmp":"tmp/gh-sync_1.1.0_1744061394802_0.3154565745432174","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@cogniwave/gh-sync","version":"1.1.2","keywords":["github","devtools","typescript","bun"],"author":{"url":"https://cogniwave.pt","name":"Tiago Ribeiro","email":"tiago.ribeiro@cogniwave.pt"},"license":"AGPL-3.0-only","_id":"@cogniwave/gh-sync@1.1.2","maintainers":[{"name":"ribeiro-tiago","email":"tiagoribeiro.1803@gmail.com"}],"homepage":"https://cogniwave.gitbook.io/gh-sync","bugs":{"url":"https://github.com/cogniwave/gh-sync/issues"},"bin":{"gh-sync":"dist/app.js"},"dist":{"shasum":"02cace954a07ce7339620b88e09342a7ef46217e","tarball":"https://registry.npmjs.org/@cogniwave/gh-sync/-/gh-sync-1.1.2.tgz","fileCount":2,"integrity":"sha512-1Lxdl7k5dEAc6gcuxlwwreWaHly4bH9XS+S90nvdnRBhZa8FbFsML/IcHVf/226NJ9KUDnF+HIJOFddziWO4cQ==","signatures":[{"sig":"MEQCIBRN5N/zzLxC0XkUUFvOKy5nQO3Oj+/lwIbPdrcaYXVaAiAmNemwP/zlp6FevCTwuBgd6UOSBwWwvjFqUmeyiHMxuw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cogniwave%2fgh-sync@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":4330},"main":"./dist/app.js","types":"./dist/types.d.ts","engines":{"node":">= 23.10.0"},"gitHead":"d3af0c799ae30d44f71a995a5cdafe12660c0c9a","scripts":{"dev":"bun run src/app.ts","lint":"eslint ./src","build":"tsc","format":"prettier . --write","release":"bun run build && bun changelogen --release --publish --push","lint:fix":"bun run eslint --fix","release:beta":"bun run build && bun changelogen --publishTag rc --prerelease --nameSuffix rc --push"},"_npmUser":{"name":"ribeiro-tiago","email":"tiagoribeiro.1803@gmail.com"},"repository":{"url":"git+https://github.com/cogniwave/gh-sync.git","type":"git"},"_npmVersion":"10.8.2","description":"This tool allows you to synchronize configurations (labels, workflows, rules, etc) between two GitHub repositories","directories":{},"_nodeVersion":"20.19.0","dependencies":{"commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.2.5","devDependencies":{"eslint":"^9.24.0","consola":"^3.4.2","prettier":"^3.5.3","@types/bun":"latest","changelogen":"^0.6.1","@eslint/eslintrc":"^3.3.1","eslint-config-prettier":"^10.1.1","@typescript-eslint/parser":"^8.28.0","@commander-js/extra-typings":"^13.1.0","@typescript-eslint/eslint-plugin":"^8.28.0"},"peerDependencies":{"typescript":"^5.8.2"},"_npmOperationalInternal":{"tmp":"tmp/gh-sync_1.1.2_1744063795168_0.19598765812483232","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@cogniwave/gh-sync","version":"1.1.3","description":"This tool allows you to synchronize configurations (labels, workflows, rules, etc) between two GitHub repositories","author":{"name":"Tiago Ribeiro","email":"tiago.ribeiro@cogniwave.pt","url":"https://cogniwave.pt"},"license":"AGPL-3.0-only","homepage":"https://cogniwave.gitbook.io/gh-sync","repository":{"type":"git","url":"git+https://github.com/cogniwave/gh-sync.git"},"bugs":{"url":"https://github.com/cogniwave/gh-sync/issues"},"keywords":["github","devtools","typescript","bun"],"bin":{"gh-sync":"dist/app.js"},"main":"./dist/app.js","types":"./dist/types.d.ts","publishConfig":{"access":"public"},"packageManager":"bun@1.2.5","engines":{"node":">= 23.10.0"},"scripts":{"dev":"bun run src/app.ts","build":"tsc","lint":"eslint ./src","lint:fix":"bun run eslint --fix","format":"prettier . --write","release":"bun run build && bun changelogen --release --publish --push","release:beta":"bun run build && bun changelogen --publishTag rc --prerelease --nameSuffix rc --push"},"devDependencies":{"@commander-js/extra-typings":"^13.1.0","@eslint/eslintrc":"^3.3.1","@types/bun":"latest","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0","changelogen":"^0.6.1","consola":"^3.4.2","eslint":"^9.24.0","eslint-config-prettier":"^10.1.1","prettier":"^3.5.3"},"peerDependencies":{"typescript":"^5.8.2"},"dependencies":{"commander":"^13.1.0"},"_id":"@cogniwave/gh-sync@1.1.3","gitHead":"017e2639b24f3a9f5f08e1d3fa3ab69a160b4b6b","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-f8BL5y8grw8ofjaUVmS5mGDJbzAPLhct6pJ2z8OdA8RUwpw0CwCln2IE9J4R0lMccY/+C3na2ZlD+6CsRWSzOw==","shasum":"00207b3d5a33b2399103e002c3afa87c2975e056","tarball":"https://registry.npmjs.org/@cogniwave/gh-sync/-/gh-sync-1.1.3.tgz","fileCount":2,"unpackedSize":5774,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@cogniwave%2fgh-sync@1.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDEYibZm555UGdg8UrmS0GeRYudsodIAYjPXS53fnBe0AiEA0SND3MEqwSZZx+JXtuYlqW3WPaPaAmkakXjNj/sIVTk="}]},"_npmUser":{"name":"ribeiro-tiago","email":"tiagoribeiro.1803@gmail.com"},"directories":{},"maintainers":[{"name":"ribeiro-tiago","email":"tiagoribeiro.1803@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gh-sync_1.1.3_1744065662344_0.584680745407546"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-07T21:29:54.685Z","modified":"2025-04-07T22:41:02.978Z","1.1.0":"2025-04-07T21:29:54.988Z","1.1.2":"2025-04-07T22:09:55.394Z","1.1.3":"2025-04-07T22:41:02.558Z"},"bugs":{"url":"https://github.com/cogniwave/gh-sync/issues"},"author":{"name":"Tiago Ribeiro","email":"tiago.ribeiro@cogniwave.pt","url":"https://cogniwave.pt"},"license":"AGPL-3.0-only","homepage":"https://cogniwave.gitbook.io/gh-sync","keywords":["github","devtools","typescript","bun"],"repository":{"type":"git","url":"git+https://github.com/cogniwave/gh-sync.git"},"description":"This tool allows you to synchronize configurations (labels, workflows, rules, etc) between two GitHub repositories","maintainers":[{"name":"ribeiro-tiago","email":"tiagoribeiro.1803@gmail.com"}],"readme":"# gh-sync\n\n[![Latest version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![npm][npm-src]][npm-href] [![Publish workflow][publish-workflow-src]][publish-workflow-href] [![Documentation - Powered by GitBook][gitbook-src]][gitbook-href]\n\n- [✨ Release Notes](/CHANGELOG.md)\n- [📖 Documentation - powered by GitBook](https://cogniwave.gitbook.io/gh-sync)\n\n\nThis tool allows you to synchronize labels between two GitHub repositories. It retrieves the labels from a source repository and updates the labels in the target repository.\n\nIt requires a GitHub access token with the necessary permissions to manage labels on GitHub repositories.\n\n## Setup\n\n### Installation\n\nInstall it globally or locally with whatever package manager you use\n\n```bash\nnpm install -g @cogniwave/gh-sync\npnpm add -g @cogniwave/gh-sync\nyarn global add @cogniwave/gh-sync\nbun add @cogniwave/gh-sync\n```\n\n### Direct Execution with npx (or other runners)\n\nIf you prefer not to install the tool globally, you can run it directly using:\n\n```bash\nnpx @cogniwave/gh-sync\nbunx @cogniwave/gh-sync\nyarn dlx @cogniwave/gh-sync\npnpm @cogniwave/gh-sync\n```\n\n### Token\n\nBefore using the tool, you need to create a GitHub access token with the following required permissions:\n\n- **issues:read and write**: Used to get labels and create new ones\n- **pull requests:read and write**: Used to delete tokens in destination repository if you wish\n\n## Usage\n\nOnce you have your GitHub token, you can use the tool to sync labels between repositories.\n\n### Command Syntax\n\n```bash\n@cogniwave/gh-sync <origin> <target> [options]\n```\n\n### Arguments\n\n- `origin <string>`: The repository from which you want to copy labels in the format of `{owner}/{repository}`\n- `target <string>`: The repository where you want to update the labels in the format of `{owner}/{repository}`\n\n### Options\n\n- `--verbose`: Runs the tool in verbose mode, providing detailed logs about the operations being performed.\n- `-t, --token <string>`: Auth token to allow gh-sync to do it's thing. Use this if the token is the same for both origin and destination repositories\"\n- `--token-origin`: Auth token of the origin repository, to allow gh-sync to do it's thing\n- `--token-destination`: Auth token of the destination repository, to allow gh-sync to do it's thing\n\n### Example Usage\n\n1. To synchronize labels from `repo-a` to `repo-b`:\n\n   ```bash\n   @cogniwave/gh-sync owner/repo-a owner/repo-b --token your_github_token\n   ```\n\n2. To synchronize labels from `repo-a` to `repo-b` with implicit token:\n\n   ```bash\n   export $GITHUB_TOKEN = your_github_token\n   @cogniwave/gh-sync owner/repo-a owner/repo-b\n   ```\n\n3. To synchronize labels from `repo-a` to `repo-b` but different tokens:\n\n   ```bash\n   @cogniwave/gh-sync owner/repo-a owner/repo-b --token-origin repo-a_token --token-destination repo-b_token\n   ```\n\n4. To run the tool in verbose mode:\n\n   ```bash\n   @cogniwave/gh-sync owner/repo-a owner/repo-b --verbose\n   ```\n\n## Development\n\n```bash\nbun install\n```\n\nTo run:\n\n```bash\nbun dev\n```\n\n<!-- Badges -->\n\n[npm-version-src]: https://img.shields.io/npm/v/@cogniwave/gh-sync/latest.svg?style=flat&colorA=020420&colorB=00DC82\n[npm-version-href]: https://npmjs.com/package/@cogniwave/gh-sync\n[npm-downloads-src]: https://img.shields.io/npm/dm/@cogniwave/gh-sync.svg?style=flat&colorA=020420&colorB=00DC82\n[npm-downloads-href]: https://npm.chart.dev/@cogniwave/gh-sync\n[npm-src]: https://img.shields.io/npm/l/@cogniwave/gh-sync.svg?style=flat&colorA=020420&colorB=00DC82\n[npm-href]: https://npmjs.com/package/@cogniwave/gh-sync\n[publish-workflow-src]: https://img.shields.io/github/actions/workflow/status/cogniwave/gh-sync/publish.yml?branch=master\n[publish-workflow-href]: https://github.com/cogniwave/gh-sync/actions/workflows/publish.yml\n[gitbook-src]: https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1\n[gitbook-href]: https://gitbook.com/\n","readmeFilename":"README.md"}