Skip to content

Conversation

lstahlman
Copy link
Contributor

Implements the ability to manage repository labels and an issue's labels via the API.

As a part of adding support, the Labels struct was moved to label.go and an ID field was added to it.

@unknwon
Copy link
Member

unknwon commented Jul 20, 2016

As a part of adding support, the Labels struct was moved to label.go and an ID field was added to it.

I think you can just put all your changes in issue_label.go file, the labels we're talking are all about labels for issues.

@lstahlman
Copy link
Contributor Author

Done

}
label := new(Label)
return label, c.getParsedResponse("POST", fmt.Sprintf("/repos/%s/%s/labels", owner, repo),
http.Header{"content-type": []string{"application/json"}}, bytes.NewReader(body), label)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use jsonHeader to replace http.Header{"content-type": []string{"application/json"}}.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a cleaner way to do it. Updated.

@lstahlman lstahlman force-pushed the api-label-support branch 3 times, most recently from 2864f8d to 7cbbdce Compare July 23, 2016 18:32
@unknwon
Copy link
Member

unknwon commented Aug 2, 2016

Thanks!

@unknwon unknwon merged commit 8431434 into gogs:master Aug 2, 2016
unknwon added a commit that referenced this pull request Aug 2, 2016
unknwon added a commit that referenced this pull request Aug 3, 2016
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.

2 participants