Fixes #6182 - Dynflowized repository update

- [x] Dynflowize repository update
- [x] Fix old tests
- [x] Make new tests
Since you have an empty line before this function, mind including an equal one at the end of the function to help set it apart?