Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 27, 2022. It is now read-only.
/labelerPublic archive

Superseded byhttps://github.com/apps/settings - Manage labels on GitHub as code

License

NotificationsYou must be signed in to change notification settings

tonglil/labeler

Repository files navigation

Superseded byhttp://github.com/apps/settings


LabelerBuild Status

logo

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

  • Using GitHub?
  • Want to commit/copy/share your label configuration?
  • Uselabeler!

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

Inspired byinfrastructure as code tools likeTerraform and organized label systems in projects like these:

Installation

Get binaries for OS X / Linux / Windows from the latestrelease.

Or usego get:

go get -u github.com/tonglil/labeler

Usage

First, set aGitHub 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 thepublic_repo scope.
  • The token for private repos need therepo 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:

  • Fetchbug with colorfc2929
  • Fetchduplicate with colorcccccc
  • Fetchenhancement with color84b6eb
  • Fetchinvalid with colore6e6e6
  • Fetchquestion with colorcc317c
  • Fetchwontfix with colorffffff

And write them intolabels.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

Wherelabels.yaml is like:

repo:owner/namelabels:  -name:bugcolor:fc2929  -name:help wantedcolor:000000  -name:fixcolor:ccccccfrom:wontfix  -name:notescolor:fbca04

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

  • Renamewontfix tofix with colorffffff toffffff
  • Updatehelp wanted with color159818 to000000
  • Createnotes with colorfbca04
  • Deleteduplicate with colorcccccc
  • Deleteenhancement with color84b6eb
  • Deleteinvalid with colore6e6e6
  • Deletequestion with colorcc317c

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

Usage options

$ labelerLabeler is a CLI application for managing labels on Github as code.With the ability to scan and apply label changes, repository maintainers canempower contributors to submit PRs and improve the project managementprocess/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 informationUse "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


[8]ページ先頭

©2009-2025 Movatter.jp