Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
fb692b80
Commit
fb692b80
authored
Aug 26, 2017
by
Greg Messner
Browse files
Added addComment(projectId, sha, note) (#67).
parent
92afc5fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/CommitsApi.java
View file @
fb692b80
...
@@ -224,4 +224,19 @@ public class CommitsApi extends AbstractApi {
...
@@ -224,4 +224,19 @@ public class CommitsApi extends AbstractApi {
Response
response
=
post
(
Response
.
Status
.
CREATED
,
formData
,
"projects"
,
projectId
,
"repository"
,
"commits"
,
sha
,
"comments"
);
Response
response
=
post
(
Response
.
Status
.
CREATED
,
formData
,
"projects"
,
projectId
,
"repository"
,
"commits"
,
sha
,
"comments"
);
return
(
response
.
readEntity
(
Comment
.
class
));
return
(
response
.
readEntity
(
Comment
.
class
));
}
}
/**
* Add a comment to a commit.
*
* POST /projects/:id/repository/commits/:sha/comments
*
* @param projectId the project ID that the commit belongs to
* @param sha a commit hash or name of a branch or tag
* @param note the text of the comment, required
* @return a Comment instance for the posted comment
* @throws GitLabApiException GitLabApiException if any exception occurs during execution
*/
public
Comment
addComment
(
int
projectId
,
String
sha
,
String
note
)
throws
GitLabApiException
{
return
(
addComment
(
projectId
,
sha
,
note
,
null
,
null
,
null
));
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment