Skip to content

Commit

Permalink
add github-to-slack to template list
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Vlasic committed Dec 29, 2021
1 parent 0007689 commit 6f38c2d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
4 changes: 3 additions & 1 deletion cli/controller/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ const (
ExcusesTemplate = "excuses"
ChatTemplate = "chat"
TodoTemplate = "todo"
G2STemplate = "github-to-slack"
)

var TemplateRepos = map[string]string{
PingTemplate: "https://github.com/mantil-io/template-ping",
ExcusesTemplate: "https://github.com/mantil-io/template-excuses",
ChatTemplate: "https://github.com/mantil-io/template-chat",
TodoTemplate: "https://github.com/mantil-io/template-todo",
G2STemplate: "https://github.com/mantil-io/template-github-to-slack",
}

const (
Expand Down Expand Up @@ -110,7 +112,7 @@ func repoURL(name, repo string) (string, error) {
}

func isExternalRepo(repo string) bool {
return strings.HasPrefix(repo, "http") || strings.HasPrefix(repo, "git")
return strings.HasPrefix(repo, "http") || strings.HasPrefix(repo, "git@")
}

func projectTemplate(repo string) string {
Expand Down
9 changes: 5 additions & 4 deletions cli/texts/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,11 @@ var New = Command{
Creates a new Mantil project from the source provided with the --from option.
The source can either be an existing git repository or one of the predefined templates:
ping - https://github.com/mantil-io/template-ping
excuses - https://github.com/mantil-io/template-excuses
chat - https://github.com/mantil-io/template-chat
todo - https://github.com/mantil-io/template-todo
ping - https://github.com/mantil-io/template-ping
excuses - https://github.com/mantil-io/template-excuses
chat - https://github.com/mantil-io/template-chat
todo - https://github.com/mantil-io/template-todo
github-to-slack - https://github.com/mantil-io/template-github-to-slack
If no source is provided it will default to the template "ping".
Expand Down
9 changes: 5 additions & 4 deletions docs/commands/mantil_new.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ Creates a new Mantil project

Creates a new Mantil project from the source provided with the --from option.
The source can either be an existing git repository or one of the predefined templates:
ping - https://github.com/mantil-io/template-ping
excuses - https://github.com/mantil-io/template-excuses
chat - https://github.com/mantil-io/template-chat
todo - https://github.com/mantil-io/template-todo
ping - https://github.com/mantil-io/template-ping
excuses - https://github.com/mantil-io/template-excuses
chat - https://github.com/mantil-io/template-chat
todo - https://github.com/mantil-io/template-todo
github-to-slack - https://github.com/mantil-io/template-github-to-slack

If no source is provided it will default to the template "ping".

Expand Down

0 comments on commit 6f38c2d

Please sign in to comment.