labeler

Manage labels on GitHub as code
授权协议 MIT License
开发语言 Google Go
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 钱经赋
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Labeler

logo

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

  • Using GitHub?
  • 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

  • matlab 2018b稍有改动,数据标注后的Label Session导入MATLAB没找到ROI区域数据,因此本文用的mat文件是通过Image Labeler的Export Labels导出的 function %函数说明:读取通过MATLAB 2018b Image Labeler标记并用Export Labels导出的mat文件,将 %标记的ROI区域写入到同一个txt文件并存储。 %示

  • http://poj.org/problem?id=2296 题意:题意:给你n个点,每个点上都放一个正方形,点只能在正方形的上边或下边的中点上,所有正方形大小一样,不能有面积重叠,求最大的正方形。(n<=100) #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #include <iostrea

  • 由于每个点只可能位于正方形上边中点或下边中点,考虑2-SAT。我们可以按纵坐标升序给点排个序。若已知正方形边长为x,首先如果两个点横坐标差大于x,那么无论如何也不会覆盖。否则,计算两点纵坐标之差:1.为0,则必一上一下  2.大于0且小于x,则只能前一个点向下盖,后一个点向上盖  3.大于x小于2*x,则前一个点向上盖时,后一个必向上;后一个向下时,前一个必向下 点的个数不多,二分法每次验证一个值

  • Map Labeler Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1659 Accepted: 540 Description Map generation is a difficult task in cartography. A vital part of such task is automatic labeling

  • Map Labeler 题意 有一些点,现在要对每个点构建一个正方形,这个点可以作为此正方形的上边界的中点或者是下边界的中点,对每个点构建的正方形的边长是相等的,要求构建的这些正方形不可以重叠,但是边界可以重叠,求可以构建的正方形的最大边长是多少? 题解 对于一个点,要么向上构建正方形,要么向下构建正方形,只有两种情况,二分答案,用2-Sat判断是否满足。2-Sat最关键的也是最难的就是建图了:

  • 这是我的第一篇博文,OI省选翻车几乎爆零,于是从OI狗变成了ACMer 听前辈说多写题解、模板、心得丢博客里会有明显的进步,于是决定开始这么做了。 想着第一篇是要写题解还是要写模板,想了想还是写题解。一道比较简单的题。 题目链接:http://poj.org/problem?id=2296 题目大意:地图上有很多的城市,每个城市需要贴上一个标签,标签是正方形,而且标签的上边或者下边的中点是对应的城

相关阅读

相关文章

相关问答

相关文档