-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bot: Allow the same reviewer in both core and cloud repos #207
Conversation
1a4005d
to
d85387b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you include an example of what the new reviewers config will look like? I'm having a hard time telling exactly how this changes things.
bot/internal/env/env.go
Outdated
@@ -132,6 +132,14 @@ 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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func (e *Environment) Team() string { | |
func (e *Environment) RepoOwner() string { |
Perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to RepoOwnerTeam
since it returns a Team
name.
@zmb3 the test was updated to demonstrate what the new config will look like. Essentially UPDATE: opened a PR in the github-terraform repo with changes to the shared-workflows/bot/internal/review/review_test.go Lines 1196 to 1217 in d85387b
|
d85387b
to
6f321e4
Compare
9c2b2e8
to
6e2ca8f
Compare
6f321e4
to
04e939a
Compare
I added commit that removes the need to set the |
This PR addresses the "Cross-Repo Reviewers" issue described in #205.
The current bot configuration data model doesn't allow an engineer to be a reviewer in both the cloud and core repositories. This is an issue because we now require the core team to submit PRs to the cloud repo to manage either tools they own (e.g. release server) or deploy a new version of a component they own (e.g. TAG).
This PR provides a hacky solution that will allow us to change the bot config data model to include a cloud and core team section, while keeping the original code reviewers map in the bot so we don't have to change a large amount of code.