So I list all check runs from a specific ref using, and select the first one, then ask for a re-run (the check run failed):
const result = await octokit.checks.listForRef({
owner: organization.providerLogin,
repo: repository.name,
ref: pullRequest.ref,
});
const checkRun = result.data.check_runs[0]
await octokit.checks.rerequestRun({
owner: organization.providerLogin,
repo: repository.name,
check_run_id: checkRun.id,
});
But I receive this error Invalid check_run_id '16889946523', so I'm looking for some help now, thank you in advance.