function createCheck()

in lib/main.js [75:91]


function createCheck(check_name, title, annotations) {
    return __awaiter(this, void 0, void 0, function* () {
        const octokit = new github.GitHub(String(GITHUB_TOKEN));
        const req = Object.assign({}, github.context.repo, { ref: core.getInput('commit_sha'), check_name: check_name });
        console.log(req);
        const res = yield octokit.checks.listForRef(req);
        console.log(res);
        const check_run_id = res.data.check_runs.filter(check => check.name === check_name)[0].id;
        const update_req = Object.assign({}, github.context.repo, { check_run_id, output: {
                title,
                summary: `${annotations.length} errors(s) found`,
                annotations: annotations.slice(0, 50),
            } });
        console.log(update_req);
        yield octokit.checks.update(update_req);
    });
}