mirror of
https://github.com/jlengrand/github-templates.git
synced 2026-03-10 08:21:22 +00:00
Changes and cleanup
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user