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

Commit 88f790d

Browse files
Waterdripsalexellis
authored andcommitted
Move github app HTML templates to templates folder
The html templates for the github app creation helper have been moved into `./templates/github/` so a user can avoid copying extra files/folders if using ofc-bootstrap outside the clone dir. This was tested by building and running the create-github-app command and generating a github app Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
1 parent 9eacb6e commit 88f790d

File tree

4 files changed

+2
-39
lines changed

4 files changed

+2
-39
lines changed

cmd/create_github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func createGitHubAppE(command *cobra.Command, _ []string) error {
6565
"GitHubEvent": fmt.Sprintf("%s://system.%s/github-event", scheme, rootDomain),
6666
}
6767

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

pkg/github/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func MakeHandler(inputMap map[string]string, resCh chan AppResult) func(w http.R
4040
if r.URL.Path == "/" || r.URL.Path == "" {
4141

4242
var outBuffer bytes.Buffer
43-
tmpl, err := template.ParseFiles(path.Join("./pkg/github", "index.html"))
43+
tmpl, err := template.ParseFiles(path.Join("./templates/github", "index.html"))
4444
err = tmpl.Execute(&outBuffer, &inputMap)
4545
if err != nil {
4646
http.Error(w, err.Error(), http.StatusInternalServerError)

pkg/github/result.html

Lines changed: 0 additions & 37 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)