(
&self,
repo: BevyRepo,
issue_number: u64,
comment: &str,
)
| 373 | /// See the [Github API documentation](https://docs.github.com/en/rest/issues/comments?apiVersion=2022-11-28) for more information. |
| 374 | #[allow(clippy::result_large_err)] |
| 375 | pub fn leave_comment( |
| 376 | &self, |
| 377 | repo: BevyRepo, |
| 378 | issue_number: u64, |
| 379 | comment: &str, |
| 380 | ) -> Result<Response, ureq::Error> { |
| 381 | let response = self |
| 382 | .agent |
| 383 | .post(&format!( |
| 384 | "https://api.github.com/repos/bevyengine/{repo}/issues/{issue_number}/comments", |
| 385 | )) |
| 386 | .set("Authorization", &format!("Bearer {}", self.token)) |
| 387 | .set("Accept", "application/vnd.github+json") |
| 388 | .set("X-GitHub-Api-Version", "2022-11-28") |
| 389 | .send_json(ureq::json!({ |
| 390 | "body": comment, |
| 391 | }))?; |
| 392 | |
| 393 | Ok(response) |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | /// An issue that occurred while opening an issue on Github. |
no outgoing calls
no test coverage detected