Autoupdater fails on deleting merge request
Summary
Gitlab can not remove merge requests so after changes beetween source branch and master it fails.
Steps to reproduce
- Use autoupdater on same outdated project and ensure it make some changes in new merge request.
- Then make another merge request and introduce some of that changes in new merge request.
- Merge merge request into master branch.
- Try to run autoupdateren on firstly created merge request.
Expected behavior
Autoupdater should seer changes in master branch and remove merge request and source branch and create new ones.
Actual behavior
Autoupdater fails on removing merge request, becouse it is forbiden to everyone except project maintainer.
Possible fixes
Use python-git
module and copy repository loccaly to some temporary folder and make on it some git commands like fetch
, checkout
, reset --hard HEAD~{all commits+1}
, rebase
and push --force