Skip to content

Commit

Permalink
sleep before merging
Browse files Browse the repository at this point in the history
  • Loading branch information
ofpiyush authored May 7, 2018
1 parent 85a6903 commit d2ef7fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions automerger/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"io/ioutil"
"net/http"
"strings"
"time"
)

type PushEventHandler struct {
Expand Down Expand Up @@ -60,6 +61,10 @@ func (p *PushEventHandler) MergeBranches(repoURL, assignee string, installationI
if len(handleErrs(errs...)) > 0 {
return
}
// Todo: Find a more stable way to accomplish this.
// Sleep for 30 seconds to allow deleting branches.
time.Sleep(30 * time.Second)

var branches []Namer
if len(handleErrs(GithubRequest("GET", URL(repoURL, "branches"), token, http.StatusOK, nil, &branches)...)) > 0 {
return
Expand Down

0 comments on commit d2ef7fa

Please sign in to comment.