All Projects → tonglil → Labeler

tonglil / Labeler

Licence: mit
Manage labels on GitHub as code

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Labeler

Neutron
Neutron is a CLI developed to help developers create new react projects with Redux + Redux Saga and offers well-structured code standardization.
Stars: ✭ 65 (-16.67%)
Mutual labels:  cli, open-source, tool
Git Hub
Git command line interface to GitHub
Stars: ✭ 119 (+52.56%)
Mutual labels:  github-api, cli, tool
Wait4x
Wait4X is a cli tool to wait for everything! It can be wait for a port to open or enter to rquested state.
Stars: ✭ 30 (-61.54%)
Mutual labels:  cli, tool
Plantuml Styler
Online tool to make your PlantUML diagrams look great.
Stars: ✭ 35 (-55.13%)
Mutual labels:  open-source, tool
Csswand
🎨✨ Hover your wand and use your magic spell to copy beautiful css
Stars: ✭ 1,046 (+1241.03%)
Mutual labels:  open-source, tool
Create Component App
Tool to generate different types of React components from the terminal. 💻
Stars: ✭ 879 (+1026.92%)
Mutual labels:  cli, tool
Jabbar
Find out who is interested in your GitHub Code
Stars: ✭ 14 (-82.05%)
Mutual labels:  cli, open-source
Lucid
A simple mock-application for programs that work with child processes
Stars: ✭ 45 (-42.31%)
Mutual labels:  cli, tool
Mprislyrics
Small command-line utility that displays lyrics in sync with the currently playing song in a MPRIS2 capable player.
Stars: ✭ 24 (-69.23%)
Mutual labels:  cli, tool
Fsq
A tool for querying the file system with a SQL-like language.
Stars: ✭ 60 (-23.08%)
Mutual labels:  cli, tool
Nat
nat - the 'ls' replacement you never knew you needed
Stars: ✭ 1,129 (+1347.44%)
Mutual labels:  cli, open-source
Ddecmd
DDE command line query tool
Stars: ✭ 11 (-85.9%)
Mutual labels:  cli, tool
Auto Cpufreq
Automatic CPU speed & power optimizer for Linux
Stars: ✭ 843 (+980.77%)
Mutual labels:  cli, tool
Durt
Command line tool for calculating the size of files and directories
Stars: ✭ 27 (-65.38%)
Mutual labels:  cli, tool
Tb Cli
🛠️ CLI for rapid TB generate
Stars: ✭ 8 (-89.74%)
Mutual labels:  cli, tool
Gitwar
🚀 Gitwar - Compete with Github
Stars: ✭ 44 (-43.59%)
Mutual labels:  github-api, labels
Image To Xls
A simple tool to make ascii art from an image using excel colored cells.
Stars: ✭ 75 (-3.85%)
Mutual labels:  cli, tool
Dotnet Ignore
.NET CLI tool that can download .gitignore file from gitignore repository
Stars: ✭ 18 (-76.92%)
Mutual labels:  cli, tool
Git2json
Simple tool to get a JSON from your git log.
Stars: ✭ 18 (-76.92%)
Mutual labels:  cli, tool
Pizza Cli
🍕 Order a pizza in a CLI app (just for fun!)
Stars: ✭ 58 (-25.64%)
Mutual labels:  cli, tool

Labeler Build Status

logo

Label management (create/rename/update/delete) on Github as code.

  • [x] Using GitHub?
  • [x] Want to commit/copy/share your label configuration?
  • [ ] Use labeler!

For FOSS maintainers, enable your users to submit PRs and improve the process/label system!

Inspired by infrastructure as code tools like Terraform and organized label systems in projects like these:

Installation

Get binaries for OS X / Linux / Windows from the latest release.

Or use go get:

go get -u github.com/tonglil/labeler

Usage

First, set a GitHub token in the environment (optional, the token can be set as an cli argument as well).

export GITHUB_TOKEN=xxx
  • The token for public repos need the public_repo scope.
  • The token for private repos need the repo scope.

Scanning labels

To scan existing labels from a repository and save it to a file:

labeler scan labels.yaml --repo owner/name

Which when run against a "new" repo created on GitHub, will:

  • Fetch bug with color fc2929
  • Fetch duplicate with color cccccc
  • Fetch enhancement with color 84b6eb
  • Fetch invalid with color e6e6e6
  • Fetch question with color cc317c
  • Fetch wontfix with color ffffff

And write them into labels.yaml, creating the file if it doesn't exist, otherwise overwriting its contents.

Applying labels

To apply labels to a repository:

labeler apply labels.yaml --dryrun

Where labels.yaml is like:

repo: owner/name
labels:
  - name: bug
    color: fc2929
  - name: help wanted
    color: 000000
  - name: fix
    color: cccccc
    from: wontfix
  - name: notes
    color: fbca04

Which when run against a "new" repo created on GitHub, will:

  • Rename wontfix to fix with color ffffff to ffffff
  • Update help wanted with color 159818 to 000000
  • Create notes with color fbca04
  • Delete duplicate with color cccccc
  • Delete enhancement with color 84b6eb
  • Delete invalid with color e6e6e6
  • Delete question with color cc317c

When run again, rename changes will not be run because the label already exists. In this manner, this tool is idempotent.

Usage options

$ labeler
Labeler is a CLI application for managing labels on Github as code.

With the ability to scan and apply label changes, repository maintainers can
empower contributors to submit PRs and improve the project management
process/label system!

Usage:
  labeler [command]

Available Commands:
  apply       Apply a YAML label definition file
  completion  Output shell completion code for tab completion
  scan        Save a repository's labels into a YAML definition file
  version     Print the version information

Use "labeler [command] --help" for more information about a command.

Tab completion

source <(labeler completion)

Development

glide is used to manage vendor dependencies.

Roadmap:

  • Plan -> execute (aka always dry-run first).
  • Automatically update file after renaming operations are complete.
  • Organizational support (apply/only-add one config to all repos in an organization).

Testing

This could use your contribution! Help me create a runnable test suite.

See also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].