-
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
modularize github codeowners parsing code #102
Conversation
✅ 25 passed ⋅ (learn more) |
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.
Pretty much exactly the same code from lib.rs
. Moved here to better split up code for each CODEOWNERS provider e.g. GitHub vs GitLab vs Bitbucket
pub trait OwnersOfPath { | ||
type Owner; |
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.
split primary public interface of this crate into traits to allow implementing a similar interface for each CODEOWNERS provider
pub fn of<P>(&self, path: P) -> Option<&Vec<Owner>> | ||
fn of<P>(&self, path: P) -> Option<Vec<Self::Owner>> |
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.
removed this reference in favor of an owned Vec
since it makes the interface more flexible to implement for each CODEOWNERS provider
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.
Moved from inside of tests since this added a lot of noise
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.
🎉
This sets us up to create a common interface to each CODEOWNERS provider that we implement