Open emily-hawkins opened 3 years ago
Turns out there is an issue in version 0.3.0, got this to work successfully in version 0.2.1
It seems that some fields are invalid.
Previously, in version 0.2.0, we were extracting some fields from the JSON file, namely:
file
line
message
title
annotation_level
(if it contains a valid value)But now, in version 0.3.0, we are using all fields from the JSON field.
Here's a valid annotation (taken from the documentation):
[
{
"path": "README.md",
"start_line": 2,
"end_line": 2,
"start_column": 5,
"end_column": 10,
"annotation_level": "warning",
"title": "Spell Checker",
"message": "Check your spelling for 'banaas'.",
"raw_details": "Do you mean 'bananas' or 'banana'?",
"blob_href": "https://api.github.com/repos/github/rest-api-description/git/blobs/abc"
}
]
I think it does not work because you didn't set both the start_column
and end_column
fields. In other words, you cannot specify just one value, you need to provide both. Could you please try to add "end_column": 1
with version 0.3.0?
For reference, we automatically transform "line": 7
to "start_line": 7, "end_line": 7
.
that fixed it! thank you!
If start_column
, end_column
or column
are defined we could potentially define both start_column
and end_column
using the same value.
Since we are already doing that for line
, I think it would make sense. What do you think?
If
start_column
,end_column
orcolumn
are defined we could potentially define bothstart_column
andend_column
using the same value.Since we are already doing that for
line
, I think it would make sense. What do you think?
that seems fine to me! we already updated our output to have both start and end but it might be helpful for someone else down the line
running:
the contents of the json file look like this:
and this is what is returned in github actions:
Any insight on what might be the cause of this? I have other actions that are able to annotate, though they are built into the action itself so i dont have much insight into what they might be doing differently.