Print annotations in annotations check and ignore ubuntu-latest warnings#84
Merged
Print annotations in annotations check and ignore ubuntu-latest warnings#84
Conversation
0406390 to
697f4a7
Compare
TrueBrain
reviewed
Dec 3, 2024
annotation-check/src/main.ts
Outdated
|
|
||
| for (const annotation of annotations.data) { | ||
| core.info(`${annotation.path}:${annotation.start_line} - ${annotation.message}`) | ||
| if (!annotation.message.startsWith("ubuntu-latest")) { |
Member
There was a problem hiding this comment.
Same happens from time to time for the other images. So maybe look for the other parts that are more generic.
Member
Author
There was a problem hiding this comment.
I'm not entirely convinced GH is ever going to use this format again, and we only use windows-latest & ubuntu-latest as far as I can see (and I don't think windows-latest is going to change in a meaningful way anytime soon). But I've updated it to be generic anyway. Unsure if better.
709bedf to
c33048a
Compare
Contributor
|
I like the idea, my main concern is about how to be sure about github messages formatting consistency. |
c33048a to
0525d1d
Compare
0525d1d to
a615d5b
Compare
glx22
approved these changes
Dec 3, 2024
Contributor
glx22
left a comment
There was a problem hiding this comment.
Looks good to me, but hard to test without it being force merged first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI is currently failing due to the annotation:
Apart from being irritating, this was very difficult to discover as
I had to delve into the API results to get any outputwe all missed the error that's printed in several places. This has been an issue in the past too - discovering where a single warning is coming from in the sea of CI results can be difficult, and clicking the "Check annotations" job that has the suspicious red cross gives nothing useful except "1 annotation" or whatever.So to start with, I've added a lookup of the annotations (if there are any) and that will be printed to the job output.
Then I added a condition to ignore annotations that start with "ubuntu-latest". Probably a bit hacky. I went with this rather than the more explicit method of writing the annotation out in full as it seems likely that they'll use this format again in future. Any other ideas, I'm all ears.
Completely untested, I've just been looking at the API documentation. No idea how to test it beyond running the CI.