Skip to content

Commit

Permalink
Initial commit, implementing API call
Browse files Browse the repository at this point in the history
  • Loading branch information
georgegarrington committed Oct 10, 2024
1 parent ac6fa67 commit 6903a34
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/github/api/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,20 @@ impl GitHubWrite {
Ok(())
}

pub(crate) fn remove_user_from_organization(
&self,
org: &str,
user: &str,
) -> anyhow::Result<()> {
if !self.dry_run {
let method = Method::DELETE;
let url = &format!("/orgs/{org}/members/{user}");
let response = self.client.req(method.clone(), url)?.send()?;
allow_not_found(response, method, url)?;
}
Ok(())
}

/// Create or update a branch protection.
pub(crate) fn upsert_branch_protection(
&self,
Expand Down

0 comments on commit 6903a34

Please sign in to comment.