@@ -152,7 +152,7 @@ public Note getIssueNote(Object projectIdOrPath, Long issueIid, Long noteId) thr
152
152
* @throws GitLabApiException if any exception occurs
153
153
*/
154
154
public Note createIssueNote (Object projectIdOrPath , Long issueIid , String body ) throws GitLabApiException {
155
- return (createIssueNote (projectIdOrPath , issueIid , body , null ));
155
+ return (createIssueNote (projectIdOrPath , issueIid , body , null , null ));
156
156
}
157
157
158
158
/**
@@ -166,10 +166,26 @@ public Note createIssueNote(Object projectIdOrPath, Long issueIid, String body)
166
166
* @throws GitLabApiException if any exception occurs
167
167
*/
168
168
public Note createIssueNote (Object projectIdOrPath , Long issueIid , String body , Date createdAt ) throws GitLabApiException {
169
+ return (createIssueNote (projectIdOrPath , issueIid , body , null , null )); }
170
+
171
+ /**
172
+ * Create a issues's note.
173
+ *
174
+ * @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance
175
+ * @param issueIid the issue IID to create the notes for
176
+ * @param body the content of note
177
+ * @param createdAt the created time of note
178
+ * @param internal whether the note shall be marked 'internal'
179
+ * @return the created Note instance
180
+ * @throws GitLabApiException if any exception occurs
181
+ */
182
+ public Note createIssueNote (Object projectIdOrPath , Long issueIid , String body , Date createdAt , Boolean internal ) throws GitLabApiException {
169
183
170
184
GitLabApiForm formData = new GitLabApiForm ()
171
185
.withParam ("body" , body , true )
172
- .withParam ("created_at" , createdAt );
186
+ .withParam ("created_at" , createdAt )
187
+ .withParam ("internal" , internal );
188
+ ;
173
189
Response response = post (Response .Status .CREATED , formData ,
174
190
"projects" , getProjectIdOrPath (projectIdOrPath ), "issues" , issueIid , "notes" );
175
191
return (response .readEntity (Note .class ));
0 commit comments