-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
cli/src/main/java/lt/pow/nukagit/cli/ListRepositories.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package lt.pow.nukagit.cli; | ||
|
||
import lt.pow.nukagit.proto.Repositories; | ||
import picocli.CommandLine; | ||
|
||
@CommandLine.Command(name = "list_repositories", description = "List repositories") | ||
public class ListRepositories implements Runnable { | ||
@CommandLine.ParentCommand | ||
private Main parent; | ||
@Override | ||
public void run() { | ||
System.out.println("Repositories:"); | ||
var repositories = parent.repositoriesGrpcClient() | ||
.listRepositories(Repositories.ListRepositoriesRequest.newBuilder().build()) | ||
.getRepositoriesList(); | ||
for (var repository : repositories) { | ||
System.out.println(repository.getName()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package lt.pow.nukagit.db.entities; | ||
|
||
import org.immutables.value.Value; | ||
|
||
@Value.Immutable | ||
public interface Repository { | ||
String name(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters