.
This commit is contained in:
parent
65e182d032
commit
f955457dd6
@ -7,6 +7,7 @@ The bots that drive Git Workflow for package management
|
||||
* gitea-events-rabbitmq-publisher -- takes all events from a Gitea organization (webhook) and publishes it on a RabbitMQ instance
|
||||
* maintainer-bot -- review bot to make sure maintainer signed off
|
||||
* obs-staging-bot -- build bot for a PR
|
||||
* obs-status-service -- report build status of an OBS project as an SVG
|
||||
* pr-review -- keeps PR to _ObsPrj consistent with a PR to a package update
|
||||
* prjgit-updater -- update _ObsPrj based on direct pushes and repo creations/removals from organization
|
||||
|
||||
|
@ -427,9 +427,12 @@ func (c *ObsClient) BuildStatus(project string, packages ...string) (*BuildResul
|
||||
query.Add("view", "status")
|
||||
query.Add("view", "binarylist")
|
||||
query.Add("multibuild", "1")
|
||||
if len(packages) > 0 {
|
||||
query.Add("lastbuild", "1")
|
||||
for _, pkg := range packages {
|
||||
query.Add("package", pkg)
|
||||
}
|
||||
}
|
||||
u.RawQuery = query.Encode()
|
||||
req, err := http.NewRequest("GET", u.String(), nil)
|
||||
log.Print(u.String())
|
||||
|
@ -260,7 +260,7 @@ func startBuild(h *common.RequestHandler, pr *models.PullRequest, obsClient *com
|
||||
for _, pkg := range modifiedOrNew {
|
||||
urlPkg = append(urlPkg, "onlybuild="+url.QueryEscape(pkg))
|
||||
}
|
||||
meta.ScmSync = pr.Head.Repo.CloneURL + "?" + strings.Join(urlPkg, "&") + "#" + pr.Head.Sha
|
||||
meta.ScmSync = pr.Head.Repo.CloneURL + "?" + strings.Join(urlPkg, "&") + "#" + pr.Head.Name
|
||||
meta.Title = fmt.Sprintf("PR#%d to %s", pr.Index, pr.Base.Name)
|
||||
meta.PublicFlags = common.Flags{Contents: "<disable/>"}
|
||||
|
||||
@ -410,6 +410,7 @@ func processPullNotification(h *common.RequestHandler, thread *models.Notificati
|
||||
h.LogError("failed fetching build status for '%s': %v", obsProject, err)
|
||||
return
|
||||
}
|
||||
|
||||
refProjectResult, err := obsClient.BuildStatus(refPrj, prjResult.GetPackageList()...)
|
||||
if err != nil {
|
||||
h.LogError("failed fetching ref project status for '%s': %v", refPrj, err)
|
||||
@ -428,6 +429,7 @@ func processPullNotification(h *common.RequestHandler, thread *models.Notificati
|
||||
h.LogPlainError(err)
|
||||
}
|
||||
}
|
||||
h.Log("Build status waiting: %d", buildStatus)
|
||||
// waiting for build results -- nothing to do
|
||||
|
||||
case common.ReviewStateApproved:
|
||||
@ -472,10 +474,10 @@ func main() {
|
||||
|
||||
// go ProcessingObsMessages("rabbit.opensuse.org", "opensuse", "opensuse", "")
|
||||
|
||||
// for {
|
||||
for {
|
||||
pollWorkNotifications()
|
||||
// time.Sleep(1000)
|
||||
// }
|
||||
time.Sleep(10 * time.Minute)
|
||||
}
|
||||
|
||||
stuck := make(chan int)
|
||||
<-stuck
|
||||
|
Loading…
Reference in New Issue
Block a user