This commit is contained in:
2024-08-19 17:14:20 +02:00
parent 07612fdcfc
commit f4609de5a3
5 changed files with 86 additions and 17 deletions

View File

@@ -51,6 +51,15 @@ func fetchPrGit(h *common.RequestHandler, pr *models.PullRequest) error {
}
func getObsProjectAssociatedWithPr(baseProject string, pr *models.PullRequest) string {
if pr.Base.Repo.Name == common.DefaultGitPrj {
// if default project git, we don't need it in project name to be unique
return fmt.Sprintf(
"%s:%s:PR:%d",
baseProject,
common.ObsSafeProjectName(pr.Base.Repo.Owner.UserName),
pr.Index,
)
}
return fmt.Sprintf(
"%s:%s:%s:PR:%d",
baseProject,