{"id":26780332,"url":"https://github.com/cogniwave/gh-label-sync","last_synced_at":"2025-03-29T07:16:16.275Z","repository":{"id":284972365,"uuid":"956544610","full_name":"cogniwave/gh-label-sync","owner":"cogniwave","description":"This 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.","archived":false,"fork":false,"pushed_at":"2025-03-28T16:59:59.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T17:45:39.433Z","etag":null,"topics":["bun","devtools","github","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://cogniwave.github.io/gh-label-sync","language":"TypeScript","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/cogniwave.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":"2025-03-28T12:39:42.000Z","updated_at":"2025-03-28T17:10:19.000Z","dependencies_parsed_at":"2025-03-28T17:45:48.588Z","dependency_job_id":"53123379-e10d-4c45-868c-6a00bba19613","html_url":"https://github.com/cogniwave/gh-label-sync","commit_stats":null,"previous_names":["cogniwave/gh-label-sync"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogniwave%2Fgh-label-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogniwave%2Fgh-label-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogniwave%2Fgh-label-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cogniwave%2Fgh-label-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cogniwave","download_url":"https://codeload.github.com/cogniwave/gh-label-sync/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246150452,"owners_count":20731419,"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":["bun","devtools","github","npm-package","typescript"],"created_at":"2025-03-29T07:16:15.645Z","updated_at":"2025-03-29T07:16:16.267Z","avatar_url":"https://github.com/cogniwave.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gh-label-sync\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\n# GitHub Labels Sync Tool\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### Instalation \nInstall it globally or locally with whatever package manager you use\n\n```bash\nnpm install -g gh-sync-labels\npnpm add -g gh-sync-labels\nyarn global add gh-sync-labels\nbun add gh-sync-labels\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 gh-sync-labels\nbunx gh-sync-labels\nyarn dlx gh-sync-labels\npnpm gh-sync-labels\n```\n\n### Token\n\nBefore using the tool, you need to create a GitHub access token with the following required permissions:\n- **repo**: To manage repositories (read and write labels).\n  - **repo:status**: To get the status of repository labels.\n  - **repo:labels**: To view and modify the labels of a repository.\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\ngh-sync-labels \u003corigin\u003e \u003ctarget\u003e [options]\n```\n\n### Arguments\n\n- `origin \u003cstring\u003e`: The repository from which you want to copy labels in the format of `{owner}/{repository}`\n- `target \u003cstring\u003e`: The repository where you want to update the labels in the format of `{owner}/{repository}`\n\n### Options\n\n- `-t, --token \u003cstring\u003e`: The GitHub token required to interact with GitHub's API. Ensure your token has the necessary permissions (`repo`)\nIf no token option is provided, *gh-sync-labels* will look for it in your environment variables under `GITHUB_TOKEN`\n- `--verbose`: Runs the tool in verbose mode, providing detailed logs about the operations being performed.\n\n### Example Usage\n\n1. To synchronize labels from `repo-a` to `repo-b`:\n\n   ```bash\n   gh-sync-labels 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   gh-sync-labels owner/repo-a owner/repo-b\n   ```\n\n2. To run the tool in verbose mode:\n\n   ```bash\n   gh-sync-labels owner/repo-a owner/repo-b --verbose\n   ```\n\n\n## Disclaimer\n\nThere are still improvements needed on this: \n- proper documentation\n- sync multiple repos at the same time\n- support for repos in org\n- deployment flow\n- add proper versioning with \n\n## Development \n\n```bash\nbun install\n```\n\nTo run:\n\n```bash\nbun dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcogniwave%2Fgh-label-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcogniwave%2Fgh-label-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcogniwave%2Fgh-label-sync/lists"}