public Single<Issue> changeState(Repository repository, int issueNumber, IssueState state) {
        IssueRequest editIssue = IssueRequest.builder()
                .state(state)
                .build();

        return service
                .editIssue(repository.owner().login(), repository.name(), issueNumber, editIssue)
                .map(response -> addIssueOrThrow(repository, response, R.string.error_issue_state));
    }
Change the issue state.

@param repository The issues repository
@param issueNumber The issue number to change
@param state What state to change to
@return A {@link Single} representing the changed issue
app/src/main/java/com/github/pockethub/android/core/issue/IssueStore.java