Correct the url that is used when adding a label to an issue

This commit is contained in:
Andy Wilkinson
2015-12-08 17:12:40 +00:00
parent 2275ca1daa
commit 3b2639e2d4
2 changed files with 5 additions and 3 deletions

View File

@@ -130,7 +130,8 @@ public class GitHubTemplate implements GitHubOperations {
Map<String, Object> body = new HashMap<>();
body.put("labels", Arrays.asList(labelName));
ResponseEntity<Label[]> response = this.rest.exchange(
new RequestEntity<>(body, HttpMethod.POST, URI.create(issue.getUrl())),
new RequestEntity<>(body, HttpMethod.POST,
URI.create(issue.getLabelsUrl().replace("{/name}", ""))),
Label[].class);
if (response.getStatusCode() != HttpStatus.OK) {
log.warn("Failed to add label to issue. Response status: "