diff --git a/obs-staging-bot/main.go b/obs-staging-bot/main.go index ea184f1..8085da4 100644 --- a/obs-staging-bot/main.go +++ b/obs-staging-bot/main.go @@ -300,10 +300,20 @@ func GenerateObsPrjMeta(git common.Git, gitea common.Gitea, pr *models.PullReque // set paths to parent project for idx, r := range meta.Repositories { - meta.Repositories[idx].Paths = []common.RepositoryPathMeta{{ - Project: buildPrj, - Repository: r.Name, - }} + localRepository := false + for pidx, path := range r.Paths { + // Check for path building against a repo in template project itself + if path.Project == buildPrj { + meta.Repositories[idx].Paths[pidx].Project = meta.Name + localRepository = true + } + } + if localRepository != true { + meta.Repositories[idx].Paths = []common.RepositoryPathMeta{{ + Project: buildPrj, + Repository: r.Name, + }} + } } return meta, nil }