Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add CleanedBasePath to GithubSetupData (#2141) #2142

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
13 changes: 7 additions & 6 deletions server/controllers/github_app_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ func (g *GithubAppController) ExchangeCode(w http.ResponseWriter, r *http.Reques
g.Logger.Debug("Found credentials for GitHub app %q with id %d", app.Name, app.ID)

err = templates.GithubAppSetupTemplate.Execute(w, templates.GithubSetupData{
Target: "",
Manifest: "",
ID: app.ID,
Key: app.Key,
WebhookSecret: app.WebhookSecret,
URL: app.URL,
Target: "",
Manifest: "",
ID: app.ID,
Key: app.Key,
WebhookSecret: app.WebhookSecret,
URL: app.URL,
CleanedBasePath: g.AtlantisURL.Path,
})
if err != nil {
g.Logger.Err(err.Error())
Expand Down
13 changes: 7 additions & 6 deletions server/controllers/templates/web_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,13 @@ var ProjectJobsErrorTemplate = template.Must(template.New("blank.html.tmpl").Par

// GithubSetupData holds the data for rendering the github app setup page
type GithubSetupData struct {
Target string
Manifest string
ID int64
Key string
WebhookSecret string
URL string
Target string
Manifest string
ID int64
Key string
WebhookSecret string
URL string
CleanedBasePath string
}

var GithubAppSetupTemplate = template.Must(template.New("github-app.html.tmpl").Parse(`
Expand Down