Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate annotations based on review-tools errors #1

Open
jhenstridge opened this issue Feb 6, 2020 · 1 comment
Open

Generate annotations based on review-tools errors #1

jhenstridge opened this issue Feb 6, 2020 · 1 comment

Comments

@jhenstridge
Copy link

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

  1. 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.

  2. 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.

@lucyllewy
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants