{"id":27155443,"url":"https://github.com/karthikudyawar/github-label-sync-tool","last_synced_at":"2025-07-25T23:32:47.892Z","repository":{"id":286501730,"uuid":"961555725","full_name":"KarthikUdyawar/GitHub-Label-Sync-Tool","owner":"KarthikUdyawar","description":"Tool that sync labels from CSV to GitHub repositories via CLI.","archived":false,"fork":false,"pushed_at":"2025-04-06T21:39:18.000Z","size":1191,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T01:58:28.419Z","etag":null,"topics":["automation","bash","cli-tool","conventionalcommits","csv","developer-tools","github-api","github-label-manager","github-labels","label-management","label-sync","open-source","shell-script","shellcheck"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KarthikUdyawar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-04-06T18:51:16.000Z","updated_at":"2025-04-06T21:39:21.000Z","dependencies_parsed_at":"2025-04-10T01:48:34.391Z","dependency_job_id":null,"html_url":"https://github.com/KarthikUdyawar/GitHub-Label-Sync-Tool","commit_stats":null,"previous_names":["karthikudyawar/github-label-sync-tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/KarthikUdyawar/GitHub-Label-Sync-Tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarthikUdyawar%2FGitHub-Label-Sync-Tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarthikUdyawar%2FGitHub-Label-Sync-Tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarthikUdyawar%2FGitHub-Label-Sync-Tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarthikUdyawar%2FGitHub-Label-Sync-Tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KarthikUdyawar","download_url":"https://codeload.github.com/KarthikUdyawar/GitHub-Label-Sync-Tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarthikUdyawar%2FGitHub-Label-Sync-Tool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267083663,"owners_count":24033347,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["automation","bash","cli-tool","conventionalcommits","csv","developer-tools","github-api","github-label-manager","github-labels","label-management","label-sync","open-source","shell-script","shellcheck"],"created_at":"2025-04-08T19:40:26.258Z","updated_at":"2025-07-25T23:32:47.879Z","avatar_url":"https://github.com/KarthikUdyawar.png","language":"Shell","readme":"\u003ch1 align=\"center\"\u003e🚀 GitHub Label Sync Tool\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\u003ci\u003eSync Smarter. Label Better.\u003c/i\u003e\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/KarthikUdyawar/GitHub-Label-Sync-Tool/stargazers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/KarthikUdyawar/GitHub-Label-Sync-Tool?style=social\" alt=\"GitHub stars\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/KarthikUdyawar/GitHub-Label-Sync-Tool/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/KarthikUdyawar/GitHub-Label-Sync-Tool\" alt=\"License\"/\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/shellcheck-passing-brightgreen?logo=gnu-bash\u0026logoColor=white\" alt=\"ShellCheck\"/\u003e\n  \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen\" alt=\"PRs Welcome\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" alt=\"GitHub Label Sync Tool Logo\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n---\n\nA shell script to **sync GitHub issue labels** from a CSV file to a repository using the GitHub API.  \nEasily validate, create, update, and optionally delete labels to keep your GitHub repositories clean and consistent.\n\n---\n\n## 📜 Table of Contents\n\n- [📜 Table of Contents](#-table-of-contents)\n- [🛠 Features](#-features)\n- [📦 Installation](#-installation)\n- [🚀 Usage](#-usage)\n  - [Flags](#flags)\n- [🧪 CSV Format](#-csv-format)\n  - [Constraints](#constraints)\n- [🔐 Authentication](#-authentication)\n- [📈 Output Summary](#-output-summary)\n- [🧑‍💻 Contributing](#-contributing)\n  - [🧪 Before submitting a PR](#-before-submitting-a-pr)\n- [📄 License](#-license)\n\n---\n\n## 🛠 Features\n\n- ✅ Validates label CSV structure and field formats\n- 🔄 Creates or updates GitHub labels\n- 🧹 Optionally deletes existing labels not in CSV\n- 🔐 Uses GitHub Personal Access Token (PAT) for authentication\n- 💬 Provides detailed feedback during syncing\n- 💡 Simple, dependency-free Bash script\n\n---\n\n## 📦 Installation\n\n```bash\ngit clone https://github.com/KarthikUdyawar/GitHub-Label-Sync-Tool.git\ncd GitHub-Label-Sync-Tool\nchmod +x github_label_sync.sh\n```\n\n---\n\n## 🚀 Usage\n\n```bash\n./github_label_sync.sh -f labels.csv -r user/repo [-d]\n```\n\n### Flags\n\n| Flag | Description |\n|------|-------------|\n| `-f` | Path to the CSV file (default: `labels.csv`) |\n| `-r` | Target GitHub repository in format `user/repo` |\n| `-d` | Delete existing labels not in CSV (optional) |\n| `-h` | Show help message |\n\n---\n\n## 🧪 CSV Format\n\nThe input file must have a header and exactly 3 columns per row:\n\n```csv\nname,color,description\nbug,f29513,Something isn't working\nenhancement,84b6eb,New feature or request\n```\n\n### Constraints\n\n- `name` must not be empty\n- `color` must be a valid hex (e.g., `f29513`)\n- `description` must not exceed 100 characters\n\n---\n\n## 🔐 Authentication\n\nThe script uses the `GITHUB_TOKEN` environment variable or prompts for it securely:\n\n```bash\nexport GITHUB_TOKEN=ghp_XXXXXXXXXXXXXXXXXXXXXXXXXXXX\n```\n\nEnsure the token has **repo** scope.\n\n---\n\n## 📈 Output Summary\n\nAt the end of the script, you’ll see a summary like:\n\n```\n🎉 Sync complete!\n  ✅ Created: 3\n  🔄 Updated: 4\n  ❌ Failed:  1\n```\n\n## 🧑‍💻 Contributing\n\nContributions are welcome! Whether it's a bug fix, feature suggestion, improvement, or documentation update—feel free to open an issue or submit a pull request.\n\nTo contribute:\n\n```bash\n# 1. Fork the repository\ngit clone https://github.com/KarthikUdyawar/GitHub-Label-Sync-Tool.git\ncd GitHub-Label-Sync-Tool\n\n# 2. Create a new branch for your feature or fix\ngit checkout -b my-feature-branch\n\n# 3. Make your changes and commit\n# (use clear and descriptive commit messages)\ngit add .\ngit commit -m \"✨ Add new feature XYZ\"\n\n# 4. Push to your fork and open a pull request\ngit push origin my-feature-branch\n```\n\n### 🧪 Before submitting a PR\n\n- ✅ Ensure your changes are tested and working.\n- 🧹 Lint your shell script using [ShellCheck](https://www.shellcheck.net/):\n\n  ```bash\n  docker run --rm -v \"$PWD:/mnt\" koalaman/shellcheck:stable ./github_label_sync.sh\n  ```\n\n- 📜 Update the README or docs if your changes affect usage or behavior.\n- 📌 Reference the issue number in your PR if it's related to an open issue.\n- 🛠️ Use [Conventional Commits](https://www.conventionalcommits.org/) for commit messages.\n- 🔍 Check [open issues](https://github.com/KarthikUdyawar/GitHub-Label-Sync-Tool/issues) for inspiration or existing tasks.\n\n---\n\n## 📄 License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarthikudyawar%2Fgithub-label-sync-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarthikudyawar%2Fgithub-label-sync-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarthikudyawar%2Fgithub-label-sync-tool/lists"}