public static boolean isRebasingPublishedCommit(@NotNull GitRepository repository,
                                                  @Nullable String baseBranch,
                                                  @NotNull String rebasingBranch) {
    try {
      String range = GitRebaseUtils.getCommitsRangeToRebase(baseBranch, rebasingBranch);
      List<? extends TimedVcsCommit> commits = GitHistoryUtils.collectTimedCommits(repository.getProject(), repository.getRoot(), range);
      return exists(commits, commit -> GitProtectedBranchesKt.isCommitPublished(repository, commit.getId()));
    }
    catch (VcsException e) {
      LOG.error("Couldn't collect commits", e);
      return true;
    }
  }
public static boolean isRebasingPublishedCommit(@NotNull GitRepository repository,
                                                  @Nullable String baseBranch,
                                                  @NotNull String rebasingBranch)