Go-github: Support new preview Label API improvements

Created on 22 Feb 2018  Â·  11Comments  Â·  Source: google/go-github

Following GitHub announcement https://github.com/blog/2505-label-improvements-emoji-descriptions-and-more, it would be useful to be able to define and access to label descriptions.

enhancement good first issue

Most helpful comment

All 11 comments

Thanks, @DirtyF, for filing the issue.

As far as I can tell, the GitHub API does not expose the description of each label:
https://developer.github.com/v3/pulls/#response

It only exposes the following fields:

* ID     *int64  `json:"id,omitempty"`
* URL    *string `json:"url,omitempty"`
* Name   *string `json:"name,omitempty"`
* Color  *string `json:"color,omitempty"`
* NodeID *string `json:"node_id,omitempty"`

Indeed, check out this response:
https://api.github.com/repos/google/go-github/pulls/853

  "labels": [
    {
      "id": 698400531,
      "url": "https://api.github.com/repos/google/go-github/labels/cla:%20yes",
      "name": "cla: yes",
      "color": "0e8a16",
      "default": false
    }
  ],

The name of the label is provided, but not the description of the label.
(Looking at it more closely, I don't know what NodeID represents or why we don't support Default, but that is a separate issue :smile:)

If you wish, you could contact [email protected] and request that they add the description to their API, at which point we could add support for it. Thanks again.

@DirtyF Historically, API access to new features comes some time after the feature is released on github.com. The linked announcement says the following about API access:

API and Enterprise support for these features is coming soon!

You'll need to watch https://developer.github.com/changes/ for that.

Wow, that was quick! OK, I'm going to hijack this issue and change the title now that the preview API has been announced.

GitHub Developer API announcement:
https://developer.github.com/changes/2018-02-22-label-description-search-preview/

This would be a great PR for any new contributor to this repo or a new Go developer.
All contributions are greatly appreciated!

Feel free to volunteer for any issue, and we can send you an invite to contribute to the repo (which you then accept) and the issue can be assigned to you so that others don't attempt to duplicate the work.

Make sure you have two-factor authentication enabled on GitHub.

Thank you!

That's something I would be interested in contributing to.
I was looking for that feature too.

Is this issue still available for contribution?

I am new to Golang and OpenSource. I would like to contribute to this feature.

ProTipâ„¢ Don't ask for permission if it's not clearly stated someone is already working on this, open a PR early on and present how you want to solve this issue, to get you started.

@gjacquet you mentioned that you'd be interested in contributing to this. Is that still the case? If not, @MonicB14 can work on it. 🙂

I’m still interested!

Whups! I dropped the ball. I'll send invites out so that you both can be assigned issues in this repo. Please make sure your two-factor authentication is turned on for GitHub before you accept the invitation.
Once you accept, I'll assign this issue to you, @gjacquet since you spoke up first.

Thank you both for your interest and your help! It is greatly appreciated.

This has been implemented via PR #866 and merged as commit 64f8f21e24feb72595a384afcf66f9caa7106fbf.

Thanks @gjacquet!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

adrienzieba picture adrienzieba  Â·  3Comments

dmitshur picture dmitshur  Â·  3Comments

csandanov picture csandanov  Â·  3Comments

xcoulon picture xcoulon  Â·  3Comments

zulhfreelancer picture zulhfreelancer  Â·  3Comments