Allow self-satisfaction of codeowner groups.#93
Conversation
Summary of ChangesHello @Icantjuddle, 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 new feature that allows pull request authors to automatically satisfy codeowner groups they are part of. Previously, even if an author was a codeowner for a file, another member of that group would still need to approve the change. With the new 'allow_self_approval' configuration, authors can now implicitly approve their own changes for files where they are listed in an OR ownership group, streamlining the review process for internal contributions. 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. Changelog
Activity
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 a useful feature for allowing self-satisfaction of codeowner groups, controlled by a new allow_self_approval configuration option. The implementation adds a new AuthorMode to handle the logic within SetAuthor. The changes are well-tested at the package level with comprehensive new test cases. However, I've identified a significant issue in a mock implementation in internal/app/app_test.go which prevents the new self-approval logic from being tested at the application level. This should be addressed to ensure full test coverage for the new feature.
BakerNet
left a comment
There was a problem hiding this comment.
Thanks for the contribution! I can see why this feature would be desired by some teams so I'm good with this going in.
Would you mind copying the codeowners.toml text over to the README and then run ./scripts/covbadge.sh before commit?
23fa311 to
73c1a42
Compare
|
Thanks! |
Summary / Background
It is useful to be able to allow self-satisfaction of codeowner groups.
i.e. if COs for some files are
aliceandbob,bobis allowed to push code without alices specific approval since he is an owner of the code.Implements via a config item to allow "self approval".
In code I add a new
authorModethat determines how authors are handled bySetAuthorwhich can optionally satisfy groups they're part of.