I am confused with GitHub pull requests.
I am trying to follow a workflow where a feature branch is created from master when work is started on a new feature. When the feature is ready to be merged to master, a pull request is required (meaning the master branch is locked so an approval is required before merge).
The problem I am having is that a PR can be a long lived process. So it is quite common that by the time the PR is approved, the feature branch needs to be rebased on top of master before it can be merged. The act of doing the rebase causes the PR to be re-opened and require another approval. Depending on how long it takes to get approval on the PR, this could be a never ending cycle.
Here are the steps of what I am talking about:
- feature branch created from master
- development on feature branch
- feature development complete and PR request opened
- some time passes and master branch has new commits
- PR approved for feature
- since master is ahead of feature branch, rebase feature branch on top of master
- PR is "reset" and now requires another approval
- goto step 4
It is easy to simply say 'get the PR approved faster', but I am dealing with multiple teams across the globe so it is not always possible.
Is my workflow unreasonable? Are there Git commands I should be using that I am unfamiliar with to help alleviate this issue?
this could be a never ending cycle... my experience is that this is usually not the case. Most of the time, you will only be making small tweaks to your pull request, then rebasing. And, most of the time, you can do this quickly enough such that you don't end up in an infinite loop.