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.
I am also experiencing this.
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.
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.
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.