[Checks API] Annotations on files not changed in the pull request


#1

My GitHub App can have “non-local” check results, e.g. if a Pull Request bumps the version of a dependency without fixing up uses of that dependency’s APIs. However, there does not seem to be any way to display those annotations in source context. Clicking the “See this annotation in the file changed” button takes me to the changed files for the pull request, but that does not include the file for which I created the annotation.

Example: https://github.com/Keno/DeprecationBotTest/runs/2535973


#2

I am also experiencing this.


#3

Thank you for feedback @Keno and @Glavin001.

However, there does not seem to be any way to display those annotations in source context.

That is correct. There isn’t currently a way to display annotations for files that are not included in the pull request diff. We are tracking this feature request internally though and will update here if/when we have more news.

Cheers,

Lizz


#4

Thanks @LizzHale,

perhaps a more short term workaround might be to allow markdown in the annotation message?
That way I could add a properly-highlighted snippet of the problematic code, to at least give the user an idea of what the problem is.


#5

I have a somewhat similar issue. In my case, the annotation is on a file that is changed in the pull request, but on a line that’s outside the diff context (for example PR changes line 456, but annotation is on line 1). The annotation appears in the checks tab, but clicking through leads to the files changed tab with no annotation visible, even if I expand the whole context.