gitlab bot: use assignee name in comments
when assigning a new user for review/acceptance, use their real name in the message, not their username (the reassign will include their username a split second later anyway)
This commit is contained in:
parent
93c9224644
commit
0b332f79c9
@ -192,7 +192,7 @@ class GitlabBot(object):
|
||||
new_reviewer_obj = self.client.users.get_by_username(new_reviewer)
|
||||
|
||||
# create note for the update
|
||||
msg = {'body': self.random_new_reviewer_message().format(new_reviewer)}
|
||||
msg = {'body': self.random_new_reviewer_message().format(new_reviewer_obj.name)}
|
||||
self.client.project_mergerequest_notes.create(msg, project_id=project_obj.id,
|
||||
merge_request_id=merge_request.id)
|
||||
|
||||
@ -218,7 +218,7 @@ class GitlabBot(object):
|
||||
new_accepter_obj = self.client.users.get_by_username(new_accepter)
|
||||
|
||||
# create note for the update
|
||||
msg = {'body': self.random_reviews_done_message().format(new_accepter)}
|
||||
msg = {'body': self.random_reviews_done_message().format(new_accepter_obj.name)}
|
||||
self.client.project_mergerequest_notes.create(msg, project_id=project_obj.id,
|
||||
merge_request_id=merge_request.id)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user