Greetings.
I am trying to add a comment to my PR. I tried both the method from the documntation and from Google. Both return required key not provided and do not create a comment. As you can see, the error message doesn't tell me which required key is not provided.
The json from documentation is a long one
{
"type": "pullrequest_comment",
"id": 2154,
"created_on": "2023-06-28T12:44:36.726033+00:00",
"updated_on": "2023-06-28T12:44:36.726033+00:00",
"content": {
"raw": "test text",
"markup": "plaintext",
"html": ""
},
"user": {
"type": "user"
},
"deleted": False,
"inline": {
"from": 57,
"to": 122,
"path": ""
},
"pullrequest": {
"type": "pullrequest"
},
"resolution": {
"type": "<string>",
"user": {
"type": "user"
},
"created_on": "2023-06-28T12:44:36.726033+00:00"
}
As I can see from the documentation, this json has a required parameter resolution->type, but the documentation doesn't mention what are allowed values for this resolution->type. There's also inline->path that is also required and I also have no idea what to write as a path. The most stupid part is that the key content is not marked as required -- why would I create a comment with no content? But a random key resolution is required?
The simpler json I tried is just
{
"content": {
"raw": "first!"
}
}I found it both on Stackoverflow and Atlassian Community. I have no idea why it worked for those people because this json clearly doesn't have a bunch of required parameters.