Closed micheelengronne closed 5 years ago
Looking at the code, it doesn't seem to me that this changes existing behavior, since the only place these functions should be called for is unassign_from_mr which looks as follows:
marge/job.py- def unassign_from_mr(self, merge_request):
marge/job.py- log.info('Unassigning from MR !%s', merge_request.iid)
marge/job.py- author_id = merge_request.author_id
marge/job.py- if author_id != self._user.id:
marge/job.py: merge_request.assign_to(author_id)
marge/job.py- else:
marge/job.py- merge_request.unassign()
This also means I don't understand why the reassign spam is actually happening in the first place. Did I overlook something?
The current patch does not seem to work. I am investigating.
The problem is not assign/unassign but the fact that marge-bot does not check if a comment was already made for this build and this status. It should check that instead.
I will write another PR.
Marge-bot will not unassign/reassign itself if it is the author.
Trying to solve https://github.com/smarkets/marge-bot/issues/189 and https://github.com/smarkets/marge-bot/issues/202