AppRunner: Clone specific branch instead of always running master

Change-Id: I262d232f5fa1648474eb8bb55ce13f986507b0d4
diff --git a/apps/app-runner/server.go b/apps/app-runner/server.go
index b906e7b..ffc5709 100644
--- a/apps/app-runner/server.go
+++ b/apps/app-runner/server.go
@@ -22,6 +22,7 @@
 	ready       bool
 	cmd         *exec.Cmd
 	repoAddr    string
+	branch      string
 	signer      ssh.Signer
 	appDir      string
 	runCommands []Command
@@ -30,13 +31,14 @@
 	logs        *Log
 }
 
-func NewServer(port int, appId string, repoAddr string, signer ssh.Signer, appDir string, runCommands []Command, self string, manager string) *Server {
+func NewServer(port int, appId string, repoAddr, branch string, signer ssh.Signer, appDir string, runCommands []Command, self string, manager string) *Server {
 	return &Server{
 		l:           &sync.Mutex{},
 		port:        port,
 		ready:       false,
 		appId:       appId,
 		repoAddr:    repoAddr,
+		branch:      branch,
 		signer:      signer,
 		appDir:      appDir,
 		runCommands: runCommands,
@@ -100,7 +102,7 @@
 }
 
 func (s *Server) run() error {
-	if err := CloneRepository(s.repoAddr, s.signer, s.appDir); err != nil {
+	if err := CloneRepositoryBranch(s.repoAddr, s.branch, s.signer, s.appDir); err != nil {
 		return err
 	}
 	logM := io.MultiWriter(os.Stdout, s.logs)