Get the comments/notes of a commit or issue
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, ...)
id (preferred way) or name of the project. Not repository name.
one of "issue" or "commit". Snippets and merge_requests are not implemented yet.
id of object:
commits: sha
issues notes/comments:
(project-wide) id for api version 4,
(global) iid for api version 3
id of note
passed on to gitlab()
API call. See Details.
Text of comment/note to add or edit (translates to GitLab API note/body respectively)
Tibble of comments with descriptive variables.
gl_comment_commit
: might also contain path
, line
and line_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 contain comment_id
to get a specific
comment of an issue.
if (FALSE) {
# 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!"
)
}