diff --git a/bots-common/obs.cfg.yaml b/bots-common/obs.cfg.yaml index e426264..643bda5 100644 --- a/bots-common/obs.cfg.yaml +++ b/bots-common/obs.cfg.yaml @@ -1,4 +1,4 @@ -package: client +package: obs output: obs/client.go generate: models: true diff --git a/bots-common/obs/client.go b/bots-common/obs/client.go index 890fa34..3d212ff 100644 --- a/bots-common/obs/client.go +++ b/bots-common/obs/client.go @@ -1,7 +1,7 @@ // Package client provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.3.0 DO NOT EDIT. -package client +package obs import ( "context" diff --git a/obs-staging-bot/main.go b/obs-staging-bot/main.go index c325977..1a18da0 100644 --- a/obs-staging-bot/main.go +++ b/obs-staging-bot/main.go @@ -8,6 +8,7 @@ import ( "src.opensuse.org/autogits/common" "src.opensuse.org/autogits/common/gitea-generated/models" + "src.opensuse.org/autogits/common/obs" ) const ( @@ -64,7 +65,10 @@ func processPullNotification(h *common.RequestHandler, notification *models.Noti switch review.State { case common.ReviewStateUnknown, common.ReviewStateRequestReview: - // start review + // start review -- create project in OBS + obsClient, _ := obs.NewClient("api.opensuse.org", obs.WithBaseURL("api.opensuse.org")) +// obsClient.GetSourceProjectNameMeta + case common.ReviewStatePending: // waiting for build results case common.ReviewStateApproved: