public TaskConfig getTaskConfig()

in src/main/java/com/googlesource/gerrit/plugins/task/TaskConfigFactory.java [73:95]


  public TaskConfig getTaskConfig(BranchNameKey branch, String fileName, boolean isTrusted)
      throws ConfigInvalidException, IOException {
    PatchSetArgument psa = psaMasquerades.get(branch);
    boolean visible = true; // invisible psas are filtered out by commandline
    if (psa == null) {
      visible = canRead(branch);
    } else {
      isTrusted = false;
      branch = BranchNameKey.create(psa.change.getProject(), psa.patchSet.refName());
    }

    Project.NameKey project = branch.project();
    TaskConfig cfg = new TaskConfig(branch, fileName, visible, isTrusted);
    try (Repository git = gitMgr.openRepository(project)) {
      cfg.load(project, git);
    } catch (IOException e) {
      log.atWarning().withCause(e).log("Failed to load %s for %s", fileName, project);
      throw e;
    } catch (ConfigInvalidException e) {
      throw e;
    }
    return cfg;
  }