Hi!
Im having a problem trying to automate some Merge Requests in Gitlab. I need to assign the MR to the last person who commited to the repo, but i cant get that info.
The problem is that with “project.commits.get(branch)”, i get the author name and email, but none of them is useful for my purpose.
In the docs i found this command: users = gl.users.list(search=‘foo’), but it only searchs by name, but theres plenty of users with the same name (ex. John Smith) so it doesnt give the desired result.
The only way to get a specific user is via user_id or username:
by ID
user = gl.users.get(user_id)
by username
user = gl.users.list(username=‘root’)[0]
But i dont know how to get that info from the last commiter via Python-Gitlab. Anyone can help?
Thanks in advance!