🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@kjanat/github-labelmanager

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kjanat/github-labelmanager

Easily manage GitHub labels

Source
npmnpm
Version
1.0.0-dev
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

github-labelmanager

Declaratively sync GitHub issue labels from a YAML config file.

Features

  • Create, update, and delete labels from a single config file
  • Rename labels via aliases (preserves issue associations)
  • Dry-run mode for safe previews
  • Works as CLI or GitHub Action

Install

Deno (Coming Soon)

# Not yet published to JSR
deno install -A jsr:@kjanat/github-labelmanager

npm (Coming Soon)

# Not yet published to npm
npm install @kjanat/github-labelmanager

Use as CLI

GITHUB_TOKEN=ghp_xxx deno task labels owner/repo

Preview changes without applying:

deno task labels owner/repo --dry-run

Use as GitHub Action

name: Sync Labels
on:
  push:
    paths:
      - ".github/labels.yml"
  workflow_dispatch:

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: kjanat/github-labelmanager@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

Inputs

InputRequiredDefaultDescription
tokenYes-GitHub token with repo access
repositoryNogithub.repositoryTarget repo in owner/repo
dry-runNofalsePreview without making changes
config-pathNo.github/labels.ymlPath to label config file

Configure

Create .github/labels.yml in your repository:

labels:
  - name: bug
    color: "#d73a4a"
    description: Something isn't working

  - name: feature
    color: "#a2eeef"
    description: New feature or request
    aliases: [enhancement] # Renames 'enhancement' to 'feature'

  - name: docs
    color: "#0075ca"
    description: Documentation improvements
    aliases: [documentation]

delete:
  - obsolete-label
  - another-old-label

Label schema

FieldRequiredDescription
nameYesLabel name
colorYesHex color (with or without #)
descriptionYesShort description
aliasesNoOld names to rename from

Delete labels

Add label names to the delete array to remove them.

Environment variables

VariableRequiredDescription
GITHUB_TOKENYesPersonal access token or secrets.GITHUB_TOKEN
REPONoFallback if not passed as argument
DRY_RUNNoSet to true for dry-run mode

Development

# Run locally
deno task labels owner/repo

# Dry run
deno task labels:dry-run owner/repo

# Type check
deno check --all

# Format
deno fmt

# Lint
deno lint

# Build npm package
deno task build

License

MIT

Keywords

github-labelmanager

FAQs

Package last updated on 03 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts