diff --git a/cmd/server.go b/cmd/server.go index c5838b6c52..036bb83dd6 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -28,7 +28,6 @@ const ( logLevelFlag = "log-level" portFlag = "port" requireApprovalFlag = "require-approval" - sshKeyFlag = "ssh-key" ) var stringFlags = []stringFlag{ diff --git a/e2e/main.go b/e2e/main.go index 4ae9898fa9..c1b4f05028 100644 --- a/e2e/main.go +++ b/e2e/main.go @@ -38,8 +38,8 @@ func main() { if atlantisURL == "" { atlantisURL = defaultAtlantisURL } - // add /hooks to the url - atlantisURL = fmt.Sprintf("%s/hooks", atlantisURL) + // add /events to the url + atlantisURL = fmt.Sprintf("%s/events", atlantisURL) ownerName := os.Getenv("GITHUB_REPO_OWNER_NAME") if ownerName == "" { ownerName = "anubhavmishra" diff --git a/server/server.go b/server/server.go index 0c75fac560..2d087e6b40 100644 --- a/server/server.go +++ b/server/server.go @@ -213,7 +213,7 @@ func (s *Server) Start() error { return r.URL.Path == "/" || r.URL.Path == "/index.html" }) s.router.PathPrefix("/static/").Handler(http.FileServer(&assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, AssetInfo: AssetInfo})) - s.router.HandleFunc("/hooks", s.postHooks).Methods("POST") + s.router.HandleFunc("/events", s.postEvents).Methods("POST") s.router.HandleFunc("/locks", s.deleteLock).Methods("DELETE").Queries("id", "{id:.*}") lockRoute := s.router.HandleFunc("/lock", s.lock).Methods("GET").Queries("id", "{id}").Name(lockRoute) // function that planExecutor can use to construct detail view url @@ -334,8 +334,8 @@ func (s *Server) deleteLock(w http.ResponseWriter, r *http.Request) { fmt.Fprint(w, "Unlocked successfully") } -// postHooks handles comment and pull request events from GitHub -func (s *Server) postHooks(w http.ResponseWriter, r *http.Request) { +// postEvents handles comment and pull request events from GitHub +func (s *Server) postEvents(w http.ResponseWriter, r *http.Request) { githubReqID := "X-Github-Delivery=" + r.Header.Get("X-Github-Delivery") var payload []byte