Skip to content

Conversation

@mklemme
Copy link

@mklemme mklemme commented Jun 2, 2019

Overview

This pr adds support for label descriptions! 🗒

Changes

  • Add Accept header to enable description support
  • 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)

@dmwyatt
Copy link

dmwyatt commented Sep 14, 2019

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

@xmeng1
Copy link

xmeng1 commented Nov 9, 2019

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants