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

Method create_check_run

src/github.rs:204–229  ·  view source on GitHub ↗

[`GH::create_check_run`]

(
        &self,
        inst_id: u64,
        owner: &str,
        repo: &str,
        issue_number: i64,
        check_details: &CheckDetails,
    )

Source from the content-addressed store, hash-verified

202
203 /// [`GH::create_check_run`]
204 async fn create_check_run(
205 &self,
206 inst_id: u64,
207 owner: &str,
208 repo: &str,
209 issue_number: i64,
210 check_details: &CheckDetails,
211 ) -> Result<()> {
212 let client = self.app_client.installation(InstallationId(inst_id))?;
213 let pr = client.pulls(owner, repo).get(issue_number as u64).await?;
214 let url = format!("{GITHUB_API_URL}/repos/{owner}/{repo}/check-runs");
215 let mut body = json!({
216 "name": GITVOTE_CHECK_NAME,
217 "head_sha": pr.head.sha,
218 "status": check_details.status,
219 "output": {
220 "title": check_details.summary,
221 "summary": check_details.summary,
222 }
223 });
224 if let Some(conclusion) = &check_details.conclusion {
225 body["conclusion"] = json!(conclusion);
226 }
227 let _: Value = client.post(url, Some(&body)).await?;
228 Ok(())
229 }
230
231 /// [`GH::create_discussion`]
232 async fn create_discussion(

Callers 4

create_voteMethod · 0.80
cancel_voteMethod · 0.80
close_finished_voteMethod · 0.80
set_check_statusFunction · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected