Skip to content

Commit

Permalink
Print annotations in annotations check and ignore github warnings (#84)
Browse files Browse the repository at this point in the history
* Change: List annotation detail in annotations check job

* Fix: Ignore annotations regarding ubuntu-latest image updates
  • Loading branch information
LordAro authored Dec 3, 2024
1 parent ecd8c9d commit 8590552
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion annotation-check/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,22 @@ async function run(): Promise<void> {
if (check_run.output.title) {
core.info(`- ${check_run.output.title}: ${check_run.output.summary}`)
}
count += check_run.output.annotations_count
if (check_run.output.annotations_count > 0) {
const annotations = await octokit.rest.checks.listAnnotations({
owner,
repo,
check_run_id: check_run.id
})

for (const annotation of annotations.data) {
core.info(`${annotation.path}:${annotation.start_line} - ${annotation.message}`)
if (annotation.annotation_level === 'warning' && annotation.path === '.github') {
// Ignore warning annotations to do with the CI. Likely *-latest upgrade notices
} else {
count += 1
}
}
}
}

if (count === 0) {
Expand Down

0 comments on commit 8590552

Please sign in to comment.