Fixes #6182 - Dynflowized repository update

- [x] Dynflowize repository update
- [x] Fix old tests
- [x] Make new tests
I can see this getting lost when reading through here and think a variable would work better and be more readable.