git-label icon indicating copy to clipboard operation
git-label copied to clipboard

Feature/label descriptions

Open mklemme opened this issue 6 years ago • 2 comments

Overview

This pr adds support for label descriptions! 🗒

Changes

  • [x] Add Accept header to enable description support
  • [x] Add description field to api calls

Usage

var labels = [
  { "name": "bug", "color": "#fc2929", "description": "Something isn't working" },
  { "name": "duplicate", "color": "#cccccc", "description": "This issue or pull request already exists" }
];
Screen Shot 2019-06-01 at 10 31 04 PM

(source: invisiblehats/git-label)

I reopened from a previous pr (#22) to clean up the commit history and base it on a non-master branch.

Issue with encoding?

There's a weird bug where the apostrophe in isn't is being formatted wrong.

The json object from github for the bug label looks like this:

{ id: 12345678,
  node_id: 'HEX123',
  url: 'https://api.github.com/repos/invisiblehats/class_name/labels/bug',
  name: 'bug',
  color: 'fc2929',
  default: true,
  description: 'Something isn%27t working' }

I followed their docs and this is supposed to work. Can someone confirm if they are experiencing the same issue? Github support told me that it should be working (I added the correct headers too)

mklemme avatar Jun 02 '19 05:06 mklemme

Maybe just special case apostrophes for now? In other words, just strip out apostrophes.

dmwyatt avatar Sep 14 '19 18:09 dmwyatt

+1

xmeng1 avatar Nov 09 '19 14:11 xmeng1