Skip to content

Commit

Permalink
Bug Fixes in Pull Requests
Browse files Browse the repository at this point in the history
  • Loading branch information
azenla committed Aug 29, 2014
1 parent ef15d86 commit 4b9ec19
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/common/pull_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class PullRequest extends PullRequestInformation {
}

Future<PullRequest> changeState(String newState) {
return github.request("PATCH", json['url'], body: JSON.encode({ "state": newState })).then((response) {
return github.request("PATCH", json['_links']['self'], body: JSON.encode({ "state": newState })).then((response) {
return PullRequest.fromJSON(github, JSON.decode(response.body));
});
}
Expand All @@ -225,13 +225,13 @@ class PullRequest extends PullRequestInformation {
Future<PullRequest> reopen() => changeState("open");

Future<PullRequest> changeTitle(String newTitle) {
return github.request("PATCH", json['url'], body: JSON.encode({ "title": newTitle })).then((response) {
return github.request("PATCH", json['_links']['self'], body: JSON.encode({ "title": newTitle })).then((response) {
return PullRequest.fromJSON(github, JSON.decode(response.body));
});
}

Future<PullRequest> changeBody(String newBody) {
return github.request("PATCH", json['url'], body: JSON.encode({ "body": newBody })).then((response) {
return github.request("PATCH", json['_links']['self'], body: JSON.encode({ "body": newBody })).then((response) {
return PullRequest.fromJSON(github, JSON.decode(response.body));
});
}
Expand Down

0 comments on commit 4b9ec19

Please sign in to comment.