Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Move github app HTML templates to templates folder #203

Merged
merged 1 commit into from
May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/create_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func createGitHubAppE(command *cobra.Command, _ []string) error {
"GitHubEvent": fmt.Sprintf("%s://system.%s/github-event", scheme, rootDomain),
}

if _, err := os.Stat(path.Join("./pkg/github", "index.html")); err != nil {
if _, err := os.Stat(path.Join("./templates", "github", "index.html")); err != nil {
return fmt.Errorf(`cannot find template "index.html", run this command from the ofc-bootstrap repository`)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/github/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func MakeHandler(inputMap map[string]string, resCh chan AppResult) func(w http.R
if r.URL.Path == "/" || r.URL.Path == "" {

var outBuffer bytes.Buffer
tmpl, err := template.ParseFiles(path.Join("./pkg/github", "index.html"))
tmpl, err := template.ParseFiles(path.Join("./templates/github", "index.html"))
err = tmpl.Execute(&outBuffer, &inputMap)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
Expand Down
37 changes: 0 additions & 37 deletions pkg/github/result.html

This file was deleted.

File renamed without changes.