| | |
| | | import com.gitblit.models.ProjectModel; |
| | | import com.gitblit.models.RepositoryModel; |
| | | import com.gitblit.models.UserModel; |
| | | import com.gitblit.transport.ssh.CommandMetaData; |
| | | import com.gitblit.transport.ssh.commands.CommandMetaData; |
| | | import com.gitblit.transport.ssh.commands.SshCommand; |
| | | |
| | | @CommandMetaData(name = "ls", description = "List repositories or projects") |
| | |
| | | } |
| | | |
| | | protected void listProjects() { |
| | | IGitblit gitblit = ctx.getGitblit(); |
| | | UserModel user = ctx.getClient().getUser(); |
| | | IGitblit gitblit = getContext().getGitblit(); |
| | | UserModel user = getContext().getClient().getUser(); |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); |
| | | |
| | | List<ProjectModel> projects = gitblit.getProjectModels(user, false); |
| | |
| | | } |
| | | |
| | | protected void listRepositories() { |
| | | IGitblit gitblit = ctx.getGitblit(); |
| | | UserModel user = ctx.getClient().getUser(); |
| | | IGitblit gitblit = getContext().getGitblit(); |
| | | UserModel user = getContext().getClient().getUser(); |
| | | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); |
| | | |
| | | List<RepositoryModel> repositories = gitblit.getRepositoryModels(user); |