1.5.0 โ€ข Published 4 months ago

octo-labels v1.5.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

๐Ÿ™๐Ÿ”– OctoLabels - GitHub Label Management Tool

๐Ÿš€ Release & Publish

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
    Utilize react-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

  1. Clone the repository:

    git clone https://github.com/0x1ad2/octo-labels
    cd octo-labels
  2. Install dependencies:

    npm i --legacy-peer-deps
  3. Initialize the project:

    npm run init

    This will export existing GitHub labels and start the development server.

  4. Modify labels as needed:

    • Copy default-github-labels.json to new-github-labels.json.
    • Edit the JSON file to adjust labels according to your needs.
  5. To start fresh, delete all labels using:

    npm run delete
  6. Add the updated labels:

    npm run add -- --filePath path/to/your-labels.json
  7. 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.

  1. Display help information:

    npx octo-labels --help
  2. Export GitHub labels to a JSON file:

    npx octo-labels export
  3. Add labels from a JSON file to a repository:

    npx octo-labels add --filePath path/to/your-labels.json
  4. Delete all labels in a repository:

    npx octo-labels delete
  5. 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

NAMEDESCRIPTIONCOLOR
๐Ÿž BUGSomething isn't working#B60205
๐Ÿš€ FEATURENew feature request#1D76DB
๐Ÿ“š DOCUMENTATIONDocumentation updates or fixes#0075CA
๐Ÿ”ง IMPROVEMENTEnhancement to an existing feature#0052CC
โ“ QUESTIONGeneral inquiries or discussions#D876E3
๐ŸŽจ REFACTORCode cleanup without functionality change#8E44AD
๐Ÿ—‘๏ธ DEPRECATIONFeatures planned for removal#E67E22
โš ๏ธ SECURITYSecurity vulnerabilities#D93F0B
๐Ÿš‡ CI/CDRelated to CI/CD pipelines#0E8A16
๐Ÿ—๏ธ BUILDBuild system, dependencies, or config changes#F9D0C4
๐Ÿงช TESTSTesting-related issues or PRs#E4E669
๐Ÿ› ๏ธ MAINTENANCEGeneral upkeep and codebase health#BFDADC
๐ŸŽญ UX/UIUser experience or interface improvements#BFDADC
๐ŸŒ LOCALIZATIONTranslation & multi-language support#1D76DB
โš™๏ธ CONFIGConfiguration or environment changes#5319E7
๐Ÿด ACCESSIBILITYIssues related to A11Y#A2EEEF
๐Ÿ“Œ METARepository-level changes#BFDADC
๐Ÿšฆ TRIAGENeeds initial review or categorization#D4C5F9
๐Ÿค CONTRIBUTIONContribution guidelines, templates, etc.#0E8A16

Priority Labels

NAMEDESCRIPTIONCOLOR
๐Ÿ”ฅ PRIORITY: CRITICALNeeds urgent attention#FF0000
โณ PRIORITY: HIGHImportant but not blocking#FBCA04
๐Ÿ’ค PRIORITY: LOWCan be delayed#C2E0C6

Status Labels

NAMEDESCRIPTIONCOLOR
๐Ÿšง STATUS: IN PROGRESSWork in progress#FF9B00
โœ… STATUS: READY FOR REVIEWReady for feedback#0E8A16
๐Ÿ›‘ STATUS: BLOCKEDWaiting on something before progressing#E11D21
๐Ÿ•’ STATUS: PENDINGAwaiting response or details#C2E0C6
๐Ÿ†• NEW ISSUENewly created issue#5319E7
๐Ÿ“ฆ STATUS: DONECompleted tasks#6F42C1
๐Ÿท๏ธ DUPLICATEAlready reported#CCCCCC
โŒ WONTFIXNot planned for resolution#D4C5F9
๐Ÿ’ก GOOD FIRST ISSUEIdeal for newcomers#7057FF
๐Ÿšธ HELP WANTEDNeeds contributor assistance#008672

Release Labels

NAMEDESCRIPTIONCOLOR
๐Ÿฉน RELEASE: PATCHBug fixes only#D4C5F9
๐Ÿ“Œ RELEASE: MINORBackward-compatible improvements#0E8A16
๐Ÿ”– RELEASE: MAJORMajor breaking changes#C2E0C6
๐Ÿท๏ธ CHANGELOGNotable changes for documentation#BFDADC

๐Ÿ“„ License

This project is licensed under the MIT License. See LICENSE for details.

1.5.0

4 months ago

1.4.0

4 months ago

1.3.3

4 months ago

1.3.2

4 months ago

1.3.1

4 months ago

1.3.0

4 months ago

1.2.0

4 months ago

1.1.1

4 months ago