about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--frontend/frontend.go14
-rw-r--r--submitqueue/submitqueue.go10
2 files changed, 0 insertions, 24 deletions
diff --git a/frontend/frontend.go b/frontend/frontend.go
index 46cd59f78b28..1f6e74452951 100644
--- a/frontend/frontend.go
+++ b/frontend/frontend.go
@@ -1,7 +1,6 @@
 package frontend
 
 import (
-	"fmt"
 	"io/ioutil"
 	"net/http"
 
@@ -61,23 +60,10 @@ func MakeFrontend(runner *submitqueue.Runner) *Frontend {
 	router.SetHTMLTemplate(tmpl)
 
 	router.GET("/submit-queue.json", func(c *gin.Context) {
-
-		// FIXME: do this periodically
-		err := submitQueue.UpdateHEAD()
-		if err != nil {
-			c.AbortWithError(http.StatusBadGateway, fmt.Errorf("unable to update HEAD"))
-		}
 		c.JSON(http.StatusOK, submitQueue)
 	})
 
 	router.GET("/", func(c *gin.Context) {
-		// FIXME: do this periodically
-
-		err := submitQueue.UpdateHEAD()
-		if err != nil {
-			c.AbortWithError(http.StatusBadGateway, fmt.Errorf("unable to update HEAD"))
-		}
-
 		c.HTML(http.StatusOK, "submit-queue.tmpl.html", gin.H{
 			"series":      submitQueue.Series,
 			"projectName": submitQueue.ProjectName,
diff --git a/submitqueue/submitqueue.go b/submitqueue/submitqueue.go
index 0b61143439f9..2676e237d957 100644
--- a/submitqueue/submitqueue.go
+++ b/submitqueue/submitqueue.go
@@ -53,16 +53,6 @@ func (s *SubmitQueue) LoadSeries(log *logrus.Logger) error {
 	return nil
 }
 
-// UpdateHEAD updates the HEAD field with the commit ID of the current HEAD
-func (s *SubmitQueue) UpdateHEAD() error {
-	HEAD, err := s.gerrit.GetHEAD(s.ProjectName, s.BranchName)
-	if err != nil {
-		return err
-	}
-	s.HEAD = HEAD
-	return nil
-}
-
 // TODO: clear submit queue tag if missing +1/+2?
 
 // IsAutoSubmittable returns true if a given Serie has all the necessary flags set