@Override
  public void setTaskState(@NotNull Task task, @NotNull CustomTaskState state) throws Exception {
    final Matcher matcher = TASK_ID_REGEX.matcher(task.getId());
    if (!matcher.matches()) {
      LOG.warn("Illegal PivotalTracker ID pattern " + task.getId());
      return;
    }
    final String projectId = matcher.group("projectId");
    final String storyId = matcher.group("storyId");
    final HttpPut request = new HttpPut(getRestApiUrl("projects", projectId, "stories", storyId));
    String payload = ourGson.toJson(Map.of("current_state", state.getId()));
    request.setEntity(new StringEntity(payload, ContentType.APPLICATION_JSON));
    getHttpClient().execute(request);
  }
@Override
  public void setTaskState(@NotNull Task task, @NotNull CustomTaskState state)