apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/CommitController.java/CommitController/find
class CommitController:  @GetMapping("/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits")
  public List<CommitDTO> find(@PathVariable String appId, @PathVariable String env,
                              @PathVariable String clusterName, @PathVariable String namespaceName,
                              @RequestParam(required = false) String key,
                              @Valid @PositiveOrZero(message = "page should be positive or 0") @RequestParam(defaultValue = "0") int page,
                              @Valid @Positive(message = "size should be positive number") @RequestParam(defaultValue = "10") int size) {
    if (permissionValidator.shouldHideConfigToCurrentUser(appId, env, namespaceName)) {
      return Collections.emptyList();
    }

    if (StringUtils.isEmpty(key)) {
      return commitService.find(appId, Env.valueOf(env), clusterName, namespaceName, page, size);
    } else {
      return commitService.findByKey(appId, Env.valueOf(env), clusterName, namespaceName, key, page, size);
    }

  }