Currently in the company I am working, we are looking to get metrics of activities in code reviews to improve our collaboration team. I would like to know if it is possible to see how many comments and who commented on each MR?
@lmatos1, there are REST APIs available to expose the information you asked about.
For example:
If you’re only after counts, the GraphQL API is probably more efficient. For example, the MergeRequest
type has a commenters
field.
Example
query getMRcommenters {
project(fullPath: "gitlab-org/gitlab") {
mergeRequest(iid: "125328") {
commenters {
nodes {
username
}
}
}
}
}
Running the above in GraphiQL, I get:
{
"data": {
"project": {
"mergeRequest": {
"commenters": {
"nodes": [
{
"username": "group_9970_bot_58e69a7d2ace73c7373ac2bc2a5cabd0"
},
{
"username": "bcarranza"
},
{
"username": "thiagocsf"
}
]
}
}
}
}
}
If you’re looking for information formatted as a report, you can look at Code review analytics, however this is a Premium feature. Example: Code Review · GitLab.org / GitLab · GitLab.