MCPcopy Create free account
hub / github.com/cncf/gitvote / user_is_collaborator

Method user_is_collaborator

src/github.rs:464–472  ·  view source on GitHub ↗

[`GH::user_is_collaborator`]

(&self, inst_id: u64, owner: &str, repo: &str, user: &str)

Source from the content-addressed store, hash-verified

462
463 /// [`GH::user_is_collaborator`]
464 async fn user_is_collaborator(&self, inst_id: u64, owner: &str, repo: &str, user: &str) -> Result<bool> {
465 let client = self.app_client.installation(InstallationId(inst_id))?;
466 let url = format!("{GITHUB_API_URL}/repos/{owner}/{repo}/collaborators/{user}",);
467 let resp = client._get(url).await?;
468 if resp.status() == StatusCode::NO_CONTENT {
469 return Ok(true);
470 }
471 Ok(false)
472 }
473}
474
475/// Represents a GitHub event.

Callers 2

create_voteMethod · 0.80
cancel_voteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected