@@ -6852,16 +6852,17 @@ const logLintIssues = (issues) => {
68526852 });
68536853};
68546854function annotateLintIssues(issues) {
6855- var _a;
6855+ var _a, _b ;
68566856 return __awaiter(this, void 0, void 0, function* () {
68576857 if (!issues.length) {
68586858 return;
68596859 }
68606860 const ctx = github.context;
6861- const ref = ctx.payload.after;
6861+ core.info(util_1.inspect(ctx, false, 4));
6862+ const ref = (_a = ctx.payload.after) !== null && _a !== void 0 ? _a : ctx.sha;
68626863 const octokit = github.getOctokit(core.getInput(`github-token`, { required: true }));
68636864 const checkRunsPromise = octokit.checks
6864- .listForRef(Object.assign(Object.assign({}, ctx.repo), { ref, status: " in_progress" }))
6865+ .listForRef(Object.assign(Object.assign({}, ctx.repo), { ref, status: ` in_progress`, filter: `latest` }))
68656866 .catch((e) => {
68666867 throw `Error getting Check Run Data: ${e}`;
68676868 });
@@ -6906,6 +6907,7 @@ function annotateLintIssues(issues) {
69066907 });
69076908 let checkRun;
69086909 const { data: checkRunsResponse } = yield checkRunsPromise;
6910+ core.info(util_1.inspect(checkRunsResponse, false, 4));
69096911 if (checkRunsResponse.check_runs.length === 0) {
69106912 throw `octokit.checks.listForRef(${ref}) returned no results`;
69116913 }
@@ -6915,7 +6917,7 @@ function annotateLintIssues(issues) {
69156917 if (!(checkRun === null || checkRun === void 0 ? void 0 : checkRun.id)) {
69166918 throw `Could not find current check run`;
69176919 }
6918- const title = (_a = checkRun.output.title) !== null && _a !== void 0 ? _a : `GolangCI-Lint`;
6920+ const title = (_b = checkRun.output.title) !== null && _b !== void 0 ? _b : `GolangCI-Lint`;
69196921 const summary = `There are {issueCounts.failure} failures, {issueCounts.wairning} warnings, and {issueCounts.notice} notices.`;
69206922 Array.from({ length: Math.ceil(githubAnnotations.length / chunkSize) }, (v, i) => githubAnnotations.slice(i * chunkSize, i * chunkSize + chunkSize)).forEach((annotations) => {
69216923 octokit.checks
0 commit comments