code: private String getWorkingRepositoryName(PropertiesParam props)
     {
        
        if (props.getProperty("repository") == null)
        {
           try
           {
              return repositoryService.getCurrentRepository().getConfiguration().getName();
           }
           catch (RepositoryException e)
           {
              throw new RuntimeException("Can not get current repository and repository name was not configured", e);
           }
        }
        else
        {
           return props.getProperty("repository");
        }
     }
docs: Get working repository name. Returns the repository name from configuration
  if it previously configured and returns the name of current repository in other case.
  
  @props  PropertiesParam
  the properties parameters
  @return String
  repository name
  @throws RepositoryException