use of com.meisolsson.githubsdk.model.request.issue.IssueRequest in project PocketHub by pockethub.
the class EditLabelsTask method subscribe.
@Override
public void subscribe(ObservableEmitter<Issue> emitter) throws Exception {
try {
List<String> labelNames = new ArrayList<>(labels.length);
for (Label label : labels) {
labelNames.add(label.name());
}
IssueRequest editIssue = IssueRequest.builder().labels(labelNames).build();
emitter.onNext(store.editIssue(repositoryId, issueNumber, editIssue));
} catch (IOException e) {
emitter.onError(e);
}
}
use of com.meisolsson.githubsdk.model.request.issue.IssueRequest in project PocketHub by pockethub.
the class EditMilestoneTask method subscribe.
@Override
public void subscribe(ObservableEmitter<Issue> emitter) throws Exception {
try {
IssueRequest editedIssue = IssueRequest.builder().milestone(milestoneNumber).build();
emitter.onNext(store.editIssue(repositoryId, issueNumber, editedIssue));
} catch (IOException e) {
emitter.onError(e);
}
}
use of com.meisolsson.githubsdk.model.request.issue.IssueRequest in project PocketHub by pockethub.
the class EditAssigneeTask method subscribe.
@Override
public void subscribe(ObservableEmitter<Issue> emitter) throws Exception {
try {
String assigneLogin;
if (assignee != null) {
assigneLogin = assignee.login();
} else {
assigneLogin = "";
}
IssueRequest edit = IssueRequest.builder().assignees(Collections.singletonList(assigneLogin)).build();
emitter.onNext(store.editIssue(repositoryId, issueNumber, edit));
} catch (IOException e) {
emitter.onError(e);
}
}
use of com.meisolsson.githubsdk.model.request.issue.IssueRequest in project PocketHub by pockethub.
the class IssueStore method changeState.
public Issue changeState(Repository repository, int issueNumber, IssueState state) throws IOException {
IssueRequest editIssue = IssueRequest.builder().state(state).build();
Issue issue = service.editIssue(repository.owner().login(), repository.name(), issueNumber, editIssue).blockingGet();
return addIssue(repository, issue);
}
Aggregations