We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
GitHubTeamMembership::is_active()
1 parent c313d87 commit 44a1813Copy full SHA for 44a1813
crates/crates_io_github/src/lib.rs
@@ -206,6 +206,12 @@ pub struct GitHubTeamMembership {
206
pub state: String,
207
}
208
209
+impl GitHubTeamMembership {
210
+ pub fn is_active(&self) -> bool {
211
+ self.state == "active"
212
+ }
213
+}
214
+
215
#[derive(Debug, Deserialize)]
216
pub struct GitHubOrgMembership {
217
src/models/team.rs
@@ -236,5 +236,5 @@ async fn team_with_gh_id_contains_user(
236
237
// There is also `state: pending` for which we could possibly give
238
// some feedback, but it's not obvious how that should work.
239
- Ok(membership.is_some_and(|m| m.state == "active"))
+ Ok(membership.is_some_and(|m| m.is_active()))
240
0 commit comments