Clean up request method calls

This commit is contained in:
Liam Newman
2019-12-16 11:18:56 -08:00
parent 0f9482864c
commit 40f05e4dbb
28 changed files with 66 additions and 107 deletions

View File

@@ -239,11 +239,11 @@ public class GHIssue extends GHObject implements Reactable {
}
private void edit(String key, Object value) throws IOException {
root.retrieve().method("POST").with(key, value).method("PATCH").withUrlPath(getApiRoute()).to();
root.retrieve().with(key, value).method("PATCH").withUrlPath(getApiRoute()).to();
}
private void editIssue(String key, Object value) throws IOException {
root.retrieve().method("POST").with(key, value).method("PATCH").withUrlPath(getIssuesApiRoute()).to();
root.retrieve().with(key, value).method("PATCH").withUrlPath(getIssuesApiRoute()).to();
}
/**
@@ -520,12 +520,7 @@ public class GHIssue extends GHObject implements Reactable {
* the io exception
*/
public void setAssignees(Collection<GHUser> assignees) throws IOException {
root.retrieve()
.method("POST")
.with(ASSIGNEES, getLogins(assignees))
.method("PATCH")
.withUrlPath(getIssuesApiRoute())
.to();
root.retrieve().method("PATCH").with(ASSIGNEES, getLogins(assignees)).withUrlPath(getIssuesApiRoute()).to();
}
/**