It'd be nice if the action generated annotations based on any warnings or errors detected by review-tools.snap-review. As I understand it, these will be surfaced on pull requests assuming that they're associated with a changed file.
There are two
output ::warning or ::error commands as described here:
It doesn't look like the @actions/core library has a public API to output such a command with the file/line/column annotations, but it should be fine to output them manually.
Create a problem matcher that can parse snap-review's output:
I think (2) may be a bit difficult with the text output of snap-review, so it might be best to ask for json output and use (1). This would also make it possible to attach the problems to the snapcraft.yaml file.
I've given this a poke in the branch experimental-yaml-mapping. Please give it a poke. I'm not very pleased, but it does work for a couple of the test cases I've thrown at it at least.
It'd be nice if the action generated annotations based on any warnings or errors detected by
review-tools.snap-review
. As I understand it, these will be surfaced on pull requests assuming that they're associated with a changed file.There are two
output
::warning
or::error
commands as described here:https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#set-a-warning-message-warning
It doesn't look like the
@actions/core
library has a public API to output such a command with the file/line/column annotations, but it should be fine to output them manually.Create a problem matcher that can parse snap-review's output:
https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers
I think (2) may be a bit difficult with the text output of snap-review, so it might be best to ask for json output and use (1). This would also make it possible to attach the problems to the
snapcraft.yaml
file.