@@ -6852,16 +6852,29 @@ 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({
6862+ ctx: ctx,
6863+ GITHUB_WORKFLOW: process.env["GITHUB_WORKFLOW"],
6864+ GITHUB_RUN_ID: process.env["GITHUB_RUN_ID"],
6865+ GITHUB_RUN_NUMBER: process.env["GITHUB_RUN_NUMBER"],
6866+ GITHUB_JOB: process.env["GITHUB_JOB"],
6867+ GITHUB_ACTION: process.env["GITHUB_ACTION"],
6868+ GITHUB_ACTIONS: process.env["GITHUB_ACTIONS"],
6869+ GITHUB_SHA: process.env["GITHUB_SHA"],
6870+ GITHUB_REF: process.env["GITHUB_REF"],
6871+ GITHUB_HEAD_REF: process.env["GITHUB_HEAD_REF"],
6872+ GITHUB_BASE_REF: process.env["GITHUB_BASE_REF"],
6873+ }, false, 4));
6874+ const ref = (_a = ctx.payload.after) !== null && _a !== void 0 ? _a : ctx.sha;
68626875 const octokit = github.getOctokit(core.getInput(`github-token`, { required: true }));
68636876 const checkRunsPromise = octokit.checks
6864- .listForRef(Object.assign(Object.assign({}, ctx.repo), { ref, status: " in_progress" }))
6877+ .listForRef(Object.assign(Object.assign({}, ctx.repo), { ref, status: ` in_progress`, filter: `latest` }))
68656878 .catch((e) => {
68666879 throw `Error getting Check Run Data: ${e}`;
68676880 });
@@ -6906,6 +6919,7 @@ function annotateLintIssues(issues) {
69066919 });
69076920 let checkRun;
69086921 const { data: checkRunsResponse } = yield checkRunsPromise;
6922+ core.info(util_1.inspect(checkRunsResponse, false, 4));
69096923 if (checkRunsResponse.check_runs.length === 0) {
69106924 throw `octokit.checks.listForRef(${ref}) returned no results`;
69116925 }
@@ -6915,7 +6929,7 @@ function annotateLintIssues(issues) {
69156929 if (!(checkRun === null || checkRun === void 0 ? void 0 : checkRun.id)) {
69166930 throw `Could not find current check run`;
69176931 }
6918- const title = (_a = checkRun.output.title) !== null && _a !== void 0 ? _a : `GolangCI-Lint`;
6932+ const title = (_b = checkRun.output.title) !== null && _b !== void 0 ? _b : `GolangCI-Lint`;
69196933 const summary = `There are {issueCounts.failure} failures, {issueCounts.wairning} warnings, and {issueCounts.notice} notices.`;
69206934 Array.from({ length: Math.ceil(githubAnnotations.length / chunkSize) }, (v, i) => githubAnnotations.slice(i * chunkSize, i * chunkSize + chunkSize)).forEach((annotations) => {
69216935 octokit.checks
0 commit comments