-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: assignees and reviewers are reapplied to automerge PRs with failed status checks #4624
Comments
I'm really surprised that's happening. Can you capture the logs at debug level during one run when Renovate reassigns the user? Renovate normally shouldn't update an MR at all unless it thinks title or body needs to change, and then I wouldn't expect it to update the reviewers. |
We experience the same issue. Here is our debug log. Please let us know if you need any further information. |
What line(s) of the log are applicable? Eg where is the assignment and unassignment happening? |
This is only the part of the log where |
We do not add assignees and reviewers on MR creation if the MR is configured for automerge. If status checks fail (preventing automerge) then this logic adds them: renovate/lib/workers/pr/index.ts Lines 231 to 237 in e327fa9
This means assignees and reviewers will continue to be added. I think if you add |
A better fix would be if we check for existing assignees and reviewers before applying the in this function: renovate/lib/workers/pr/index.ts Line 12 in e327fa9
If any exist, then we shouldn't add them. |
I forgot to add that our situation seems a little different. We simply let the renovate bot do its thing hourly, let it automatically merge when our pipeline succeeds and only want people to be assigned in case the pipeline fails. The problem being that as soon as a merge request fails that it assigns someone but keeps re-assigning people hourly afterwards. I think |
If we do a check for any existing assignees/reviewers then that should solve both problems, i.e.
Essentially: if automerge is enabled, and tests fail, then only add assignees and reviewers if none already exist. The only edge case this won't cover is if you want to fully remove assignees/reviewers, because in such a case Renovate will keep adding them again. |
I'm not sure the proposed solution is perfect because it would prevent the following from working:
|
I am encountering the same issue. I was actually expecting the behavior to be:
And if I want to change the reviewers afterwards myself, renovate won't try to interfere with it |
@njibhu sounds like you're expecting https://docs.renovatebot.com/configuration-options/#assignautomerge to default to For that scenario we could definitely skip assigning once tests fail. |
I missed that configuration setting while reading the doc! |
This is fixed. |
What would you like Renovate to be able to do?
We are using a self-hosted version of renovate on self-hosted gitlab instances (both CE and EE).
We have a general dispatching user to which new Merge-Requests are assigned.
The dispatching user now decides if the merge request will be merged directly or assigns it to another user if he is not able to decide if this is going to break stuff.
The second user has then the responsibility to check this MR in detail.
Our renovate bot runs every hour and every time it runs, it re-assigns the MR back to the dispatching user, which is quite annoying
Describe the solution you'd like
It would be great if there would be a config option to tell renovate to only assign a MR once upon creation.
Additional context
![renovate_assign](https://user-images.githubusercontent.com/45454239/66571478-a6921700-eb6f-11e9-9824-e1d7bbcbb437.png)
The text was updated successfully, but these errors were encountered: