Skip to content

Commit

Permalink
fix: rename Team func to RepoOwnerTeam
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbishopp committed Dec 29, 2023
1 parent 53bc1a7 commit 04e939a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bot/internal/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ func (e *Environment) IsCloudDeployBranch() bool {
(e.UnsafeBase == CloudProdBranch || e.UnsafeBase == CloudStagingBranch)
}

// Team returns CloudTeam when the repository is the cloud repo otherwise CoreTeam.
func (e *Environment) Team() string {
// RepoOwnerTeam returns CloudTeam when the repository is the cloud repo otherwise CoreTeam.
func (e *Environment) RepoOwnerTeam() string {
if e.Repository == CloudRepo {
return CloudTeam
}
Expand Down
4 changes: 2 additions & 2 deletions bot/internal/review/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ func FromString(e *env.Environment, reviewers string) (*Assignments, error) {
// both cloud and core repos without having to change the
// bot in a large number of places.
if len(c.CodeReviewers) == 0 { // allow this change to deploy before updating the config file
switch e.Team() {
switch e.RepoOwnerTeam() {
case env.CloudTeam:
c.CodeReviewers = c.CloudReviewers
case env.CoreTeam:
c.CodeReviewers = c.CoreReviewers
default:
return nil, trace.BadParameter("unable to detect code reviewers due to invalid team: %s", e.Team())
return nil, trace.BadParameter("unable to detect code reviewers due to invalid team: %s", e.RepoOwnerTeam())
}
}

Expand Down

0 comments on commit 04e939a

Please sign in to comment.