Support requiring owners from both base and head refs#84
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Summary of ChangesHello @BakerNet, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a significant enhancement to the code ownership system by implementing a "sum owners" feature. This new functionality allows for a more secure and explicit process for transferring file ownership by requiring approvals from both the current owners (from the base branch) and the prospective new owners (from the PR branch). This prevents unilateral ownership changes and ensures mutual agreement during handoffs, making the ownership transfer process more robust and transparent. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces the sum_owners feature, which requires approvals from codeowners in both the base and head branches, useful for ownership handoffs. The implementation involves adding a new merger.go to combine codeowner rules, updating the application logic to use this merger when the feature is enabled, and adding configuration and tests. The documentation in README.md is also updated to explain the new feature.
The changes are well-implemented and tested. I've found a minor issue related to an unused parameter (reviewerGroupManager) in the new merger logic, which makes the code slightly misleading. I've left comments with suggestions to clean this up. Overall, this is a great addition.
|
Codeowners approval required for this PR: |
|
|
||
| for _, owners := range fileToOwner { | ||
| // Process required reviewers | ||
| for _, rg := range owners.requiredReviewers { |
There was a problem hiding this comment.
could extract repeated logic into a local closure
Changes in owned files since last approval
Related Issue(s)
closes: #83
Summary / Background
Refer to the Issue for a well-written write up
Adds config
require_both_branch_reviewersconfig option to merge base branch and head branch.codeownersrules such that if there is a change in ownership both teams would be required to review.