move to reviewers

This commit is contained in:
Adam Majer 2025-02-05 14:44:22 +01:00
parent 656a3bacdf
commit f0b184f4c3

View File

@ -31,8 +31,8 @@ import (
type AutogitConfig struct { type AutogitConfig struct {
Workflows []string // [pr, direct, test] Workflows []string // [pr, direct, test]
Organization string Organization string
GitProjectName string // Organization/GitProjectName.git is PrjGit GitProjectName string // Organization/GitProjectName.git is PrjGit
Branch string // branch name of PkgGit that aligns with PrjGit submodules Branch string // branch name of PkgGit that aligns with PrjGit submodules
Reviewers []string // only used by `pr` workflow Reviewers []string // only used by `pr` workflow
} }
@ -67,9 +67,6 @@ func ReadWorkflowConfigs(reader io.Reader) ([]*AutogitConfig, error) {
if !pr && len(workflow.Reviewers) > 0 { if !pr && len(workflow.Reviewers) > 0 {
log.Println(" Warning: non-PR-only workflows contains Reviewers. These are ignored in Org:", workflow.Organization) log.Println(" Warning: non-PR-only workflows contains Reviewers. These are ignored in Org:", workflow.Organization)
} }
if pr && !slices.Contains(workflow.Reviewers, Bot_BuildReview) {
workflow.Reviewers = append(workflow.Reviewers, Bot_BuildReview)
}
} }
return config, nil return config, nil