gl_get_comments {gitlabr} | R Documentation |
Get the comments/notes of a commit or issue
Description
Get the comments/notes of a commit or issue
Usage
gl_get_comments(project, object_type = "issue", id, note_id = c(), ...)
gl_get_issue_comments(project, id, ...)
gl_get_commit_comments(project, id, ...)
gl_comment_commit(project, id, text, ...)
gl_comment_issue(project, id, text, ...)
gl_edit_comment(project, object_type, text, ...)
gl_edit_issue_comment(project, ...)
gl_edit_commit_comment(project, ...)
Arguments
project |
id (preferred way) or name of the project. Not repository name. |
object_type |
one of "issue" or "commit". Snippets and merge_requests are not implemented yet. |
id |
id of object:
|
note_id |
id of note |
... |
passed on to |
text |
Text of comment/note to add or edit (translates to GitLab API note/body respectively) |
Details
-
gl_comment_commit
: might also containpath
,line
andline_type
(old or new) to attach the comment to a specific in a file. See https://docs.gitlab.com/ce/api/commits.html -
gl_get_issue_comments
: might also containcomment_id
to get a specific comment of an issue.
Value
Tibble of comments with descriptive variables.
Examples
## Not run:
# fill in login parameters
set_gitlab_connection(
gitlab_url = "https://gitlab.com",
private_token = Sys.getenv("GITLAB_COM_TOKEN")
)
gl_get_comments(project = "<<your-project-id>>", object_type = "issue", 1)
gl_get_comments(
project = "<<your-project-id>>", "commit",
id = "8ce5ef240123cd78c1537991e5de8d8323666b15"
)
gl_comment_issue(
project = "<<your-project-id>>", 1,
text = "Almost done!"
)
## End(Not run)