-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Toolkit Annotation support #186
Comments
Today the problem matcher produce: {
"line": 1,
"column": 2,
"severity": 3,
"message": 4,
"code": 5,
} |
^^ yep, and per note from description above, if the error or warning cmd come across with those properties, it will (for compat) make it's way to an issue object and then an annotation. problem matchers will be changed to write the new command syntax. Also above is not doc'd for error/warning and will not be. |
@thboop is picking up this work today. |
Maybe I am miss understanding the "no documentation" around error and warning. I notice in this repository it is not but here it is. I have an action using the Would really love this feature! |
Adding to @dixonwille message, it would be nice to clarify if it is okay to output multiline messages with |
@dixonwille - yes, apologies. we intended to hold back on the documentation as it was going to be removed. We are preparing a patch to get back inline with the docs and hopefully go out tomorrow. we will probably abandon this specific issue and redefine toolkit error, warning with new optional parameters (as opposed to a new method) so it aligns with the documented command. @svartalf, can you log a new issue with the question on multiline? I will follow up. |
On this point:
Are problem matchers supposed to produce annotations at the moment (via some other mechanism)? I did try to port over one I had from vscode to no success, |
@garyttierney Yep! Problem matchers will produce annotations, you can check out some of the Example from Example Run with a Go syntax error Let me know if you need any help setting that up! It's possible your regex isn't catching your errors or your problem matcher isn't registered (use the command ex: |
Sorry to hijack this issue a bit, but to follow up on your comment @joshmgross: Setting Currently I work around this by a slightly ugly sed, that allows |
I asked @thboop about this, no currently we don't support a severity for problem matchers. We have a similar syntax to VS Code, but it's not a full implementation. Feel free to file an issue, I think that would be a great feature to add 😄 |
We do support group numbers for severity, which expects a group number containing either 'warning' or 'error' case-insensitive. However, you can't pass in 'error' to the problem matcher directly. If you would like that feature, please create another issue with an enhancement request! This pr adds Problem Matcher documentation for your reference: #198 |
Hello! Is there an update in the direction for this? Are one of the methods going to gain feature parity with the GitHub Annotations API? Looking to try this out and I need to convert a linter to something for annotations. Leaning towards converting the linter output into a custom format and then making a matcher for it. Would be nice though if I didn't have to do the two step process and something like this just supported all the GitHub Annotation API properties. Either way... really like this concept of being able to add annotations without needing an API token and doing API calls 👍 💯 |
Any update on where this is going? |
It seems the logging functions now support some annotations, but not |
Good catch @freaktechnik. I filed an issue: #892, which hopefully we can get to soon. |
The toolkit should support first class support for adding annotations
Annotation object will match this
Annotation level will be a toolkit enum which gets written as a string to the annotation. We need to add Notice to the timeline issue
the equivalent cmd will accept properties that match the annotation properties
echo ::add-annotation annotation_level=error, path=css/main.css, start_line=0, end_line=0::myMessage
toolkit error and warning will emit [error]message and [warning]message which the UI will decorate red or yellow. (error and warning does not currently support an annotation). The web UI should colorize but string the [error] and [warning] from the view (but still in the logs)
The existing logging error and warning command will emit [error]message and [warning]message. Even though not documented, they take properties (problem matchers). If those properties are used, then for compat, create an issue object which will become an annotation service side.
After this is complete, change problem matchers to use the add-annotation cmd or toolkit methods.
The text was updated successfully, but these errors were encountered: