octo-labels v1.5.0
๐๐ OctoLabels - GitHub Label Management Tool
OctoLabels is a React-based application built with TypeScript and Vite, designed to streamline GitHub label management. It provides an intuitive UI for visual label comparison and includes CLI scripts to automate label operations, making it an efficient solution for managing labels across repositories.
๐ Features
๐ฅ๏ธ React UI for Label Comparison
Utilizereact-json-view-compare
to visually compare label sets and track differences between repositories.๐ GitHub Label Management Scripts
Automate exporting, adding, and deleting labels using GitHub CLI for streamlined repository management.โก Vite-Powered Development
Enjoy a fast development experience with hot module replacement (HMR) and optimized build times.๐๏ธ Modular & Configurable Structure
Easily extend, modify, and manage labels using JSON-based label sets.
๐ Project Structure
๐ฆ octo-labels
โโโ ๐ src
โ โโโ ๐ App.tsx # Main React component for label comparison
โโโ ๐ scripts
โ โโโ ๐ export-github-labels.js # Exports GitHub labels to JSON
โ โโโ ๐ add-github-labels.js # Adds labels from JSON to GitHub
โ โโโ ๐ delete-github-labels.js # Deletes all labels in a repository
โ โโโ ๐ migrate-github-labels.js # Migrates labels from <owner>/<source-repo> to <owner>/<target-repo>
โโโ ๐ data/ # JSON files storing label sets
โโโ ๐ package.json # Project metadata & available scripts
๐ ๏ธ Installation & Setup
๐ Prerequisites
Before using OctoLabels, ensure you have:
- Node.js (>=
20.x
recommended) - Git installed for version control
- GitHub CLI (
gh
command-line tool) installed and authenticated (gh auth login
)
๐ฅ Install & Initialize
Clone the repository:
git clone https://github.com/0x1ad2/octo-labels cd octo-labels
Install dependencies:
npm i --legacy-peer-deps
Initialize the project:
npm run init
This will export existing GitHub labels and start the development server.
Modify labels as needed:
- Copy
default-github-labels.json
tonew-github-labels.json
. - Edit the JSON file to adjust labels according to your needs.
- Copy
To start fresh, delete all labels using:
npm run delete
Add the updated labels:
npm run add -- --filePath path/to/your-labels.json
Migrate labels from one repository to another:
npm run migrate -- --source owner/source-repo --target owner/target-repo
๐ฅ๏ธ Using the CLI
If you prefer to use the CLI directly without cloning the repository, you can run the following commands using npx
:
!WARNING
All commands are executed within the repository context. Make sure that you are in the correct directory before running the commands.
Display help information:
npx octo-labels --help
Export GitHub labels to a JSON file:
npx octo-labels export
Add labels from a JSON file to a repository:
npx octo-labels add --filePath path/to/your-labels.json
Delete all labels in a repository:
npx octo-labels delete
Migrate labels from one repository to another:
npx octo-labels migrate --source owner/source-repo --target owner/target-repo
These commands allow you to manage GitHub labels efficiently using the CLI.
๐ Labels
Type Labels
NAME | DESCRIPTION | COLOR |
---|---|---|
๐ BUG | Something isn't working | #B60205 |
๐ FEATURE | New feature request | #1D76DB |
๐ DOCUMENTATION | Documentation updates or fixes | #0075CA |
๐ง IMPROVEMENT | Enhancement to an existing feature | #0052CC |
โ QUESTION | General inquiries or discussions | #D876E3 |
๐จ REFACTOR | Code cleanup without functionality change | #8E44AD |
๐๏ธ DEPRECATION | Features planned for removal | #E67E22 |
โ ๏ธ SECURITY | Security vulnerabilities | #D93F0B |
๐ CI/CD | Related to CI/CD pipelines | #0E8A16 |
๐๏ธ BUILD | Build system, dependencies, or config changes | #F9D0C4 |
๐งช TESTS | Testing-related issues or PRs | #E4E669 |
๐ ๏ธ MAINTENANCE | General upkeep and codebase health | #BFDADC |
๐ญ UX/UI | User experience or interface improvements | #BFDADC |
๐ LOCALIZATION | Translation & multi-language support | #1D76DB |
โ๏ธ CONFIG | Configuration or environment changes | #5319E7 |
๐ด ACCESSIBILITY | Issues related to A11Y | #A2EEEF |
๐ META | Repository-level changes | #BFDADC |
๐ฆ TRIAGE | Needs initial review or categorization | #D4C5F9 |
๐ค CONTRIBUTION | Contribution guidelines, templates, etc. | #0E8A16 |
Priority Labels
NAME | DESCRIPTION | COLOR |
---|---|---|
๐ฅ PRIORITY: CRITICAL | Needs urgent attention | #FF0000 |
โณ PRIORITY: HIGH | Important but not blocking | #FBCA04 |
๐ค PRIORITY: LOW | Can be delayed | #C2E0C6 |
Status Labels
NAME | DESCRIPTION | COLOR |
---|---|---|
๐ง STATUS: IN PROGRESS | Work in progress | #FF9B00 |
โ STATUS: READY FOR REVIEW | Ready for feedback | #0E8A16 |
๐ STATUS: BLOCKED | Waiting on something before progressing | #E11D21 |
๐ STATUS: PENDING | Awaiting response or details | #C2E0C6 |
๐ NEW ISSUE | Newly created issue | #5319E7 |
๐ฆ STATUS: DONE | Completed tasks | #6F42C1 |
๐ท๏ธ DUPLICATE | Already reported | #CCCCCC |
โ WONTFIX | Not planned for resolution | #D4C5F9 |
๐ก GOOD FIRST ISSUE | Ideal for newcomers | #7057FF |
๐ธ HELP WANTED | Needs contributor assistance | #008672 |
Release Labels
NAME | DESCRIPTION | COLOR |
---|---|---|
๐ฉน RELEASE: PATCH | Bug fixes only | #D4C5F9 |
๐ RELEASE: MINOR | Backward-compatible improvements | #0E8A16 |
๐ RELEASE: MAJOR | Major breaking changes | #C2E0C6 |
๐ท๏ธ CHANGELOG | Notable changes for documentation | #BFDADC |
๐ License
This project is licensed under the MIT License. See LICENSE for details.