[`GH::user_is_collaborator`]
(&self, inst_id: u64, owner: &str, repo: &str, user: &str)
| 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. |
no outgoing calls
no test coverage detected