Changes and cleanup

This commit is contained in:
Julien Lengrand-Lambert
2021-03-16 18:26:01 +01:00
parent 4d706d23e9
commit 0d266c04ef
5 changed files with 51 additions and 3 deletions

View File

@@ -52,8 +52,8 @@ public class CreateRepositoryIntentHandler implements RequestHandler {
try{
GithubAPI api = new GithubAPI();
String language = slots.get("language").getValue();
String title = slots.get("title").getValue();
String language = slots.get("language").getValue().toLowerCase();
String title = slots.get("title").getValue().replace(" ", "-");
api.getGithub().createRepository(title)
.fromTemplateRepository(

View File

@@ -12,7 +12,9 @@ public class GithubAPI {
public static final Map<String, Pair<String, String>> TEMPLATES =
Map.of(
"java", new Pair<>("Spring-Boot-Framework", "Spring-Boot-Application-Template"),
"typescript", new Pair<>("carsonfarmer", "ts-template")
"typescript", new Pair<>("carsonfarmer", "ts-template"),
"javascript", new Pair<>("jlengrand", "openwc-template"),
"elm", new Pair<>("jlengrand", "elm-firebase")
);
private GitHub github;