gitlab api helper on types
what do you think about adding helper to the gitlab types, eg:
impl Issue {
pub fn create_note(&self, gitlab: Gitlab, content: &str) -> Result<Note> {
gitlab.create_issue_note(self.project_id, self.id, content)
}
}
ideally the Gitlab
client could even be wrapped inside the Issue
and it would allow this implementation:
impl Issue {
pub fn create_note(&self, content: &str) -> Result<Note> {
self.gitlab.create_issue_note(self.project_id, self.id, content)
}
}
not sure about the performance or BC implication, what do you think ?