Skip to content

Commit 310217a

Browse files
authored
Use Long instead of Integer in addMergeRequestAwardEmoji(..) (#1272)
Fixes #1268
1 parent d5bce14 commit 310217a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

gitlab4j-api/src/main/java/org/gitlab4j/api/AwardEmojiApi.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,9 +436,28 @@ public AwardEmoji addNoteAwardEmoji(Object projectIdOrPath, Long issueIid, Long
436436
* @param name the name of the award emoji to add
437437
* @return an AwardEmoji instance for the added award emoji
438438
* @throws GitLabApiException if any exception occurs
439+
* @deprecated use {@link #addMergeRequestAwardEmoji(Object, Long, Long, String)} instead
439440
*/
441+
@Deprecated
440442
public AwardEmoji addMergeRequestAwardEmoji(
441443
Object projectIdOrPath, Integer mergeRequestIid, Integer noteId, String name) throws GitLabApiException {
444+
return addMergeRequestAwardEmoji(projectIdOrPath, mergeRequestIid.longValue(), noteId.longValue(), name);
445+
}
446+
447+
/**
448+
* Add an award emoji for the specified merge request note.
449+
*
450+
* <pre><code>GitLab Endpoint: POST /projects/:id/merge_requests/:merge_request_iid/notes/:noteId/award_emoji</code></pre>
451+
*
452+
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
453+
* @param mergeRequestIid the merge request IID of the merge request that owns the note
454+
* @param noteId the note ID to add the award emoji to
455+
* @param name the name of the award emoji to add
456+
* @return an AwardEmoji instance for the added award emoji
457+
* @throws GitLabApiException if any exception occurs
458+
*/
459+
public AwardEmoji addMergeRequestAwardEmoji(Object projectIdOrPath, Long mergeRequestIid, Long noteId, String name)
460+
throws GitLabApiException {
442461
GitLabApiForm form = new GitLabApiForm().withParam("name", name, true);
443462
Response response = post(
444463
Response.Status.CREATED,

0 commit comments

Comments
 (0)