Search code examples
gemini

howto create issue comment in Gemini 5 API


I'm trying to add a comment to issue using Gemini 5 c# API.

The problem is that GeminiService.Item.IssueCommentCreate returns null.

commentDto object is created and passed to the IssueCommentCreate with the same properties filled (Comment, IssueId, Visibility) as for previous gemini api (FullName and ProjectId are not filled). I've tried to fill ProjectId but no luck.

Could you please share how are you adding comments?

Regards


Solution

  • The reason was that I've specified comment visibility that is not in the comment visibility classifier in the database.

    For 15 visibility value null is returned by IssueCommentCreate but comments with visibility 1 and 12 are added without any problem

    In the previous Gemini version (API Version 4.0.1.3038) I am able to add a comment with visibility 414 without any problem (comment object instance with ID filled is returned for it)

    Regards