I was unable to find anywhere on the internet what the accepted CodeReviewThreadType
values were in the Azure DevOps Thread API.I am trying to make our remote service add a system message like "Pull Request successfully linked with XY." and don't want to spam it with huge comments.
I tried abusing some of the types that I usually see in pullrequests - StatusUpdate
, RefUpdate
, ReviewersUpdate
, IsDraftUpdate
... but they seem to be translated so the "content"
of the comment is ignored and the message stays empty.
Does anyone have any experience with this? I don't need all supported types, just one that gives the desired output.
Desired output with example of content being ignored:
Code sample:
await gitApi.createThread({ comments: [ { parentCommentId: 0, content: "System Comment Test", commentType: CommentType.System, }, ], properties: { CodeReviewThreadType: {"$type": "System.String","$value": "StatusUpdate" }, },}, (pr.repository!).id!, pr.pullRequestId!);