New Skara feature: dependent pull requests

David Holmes david.holmes at
Mon Mar 29 23:15:27 UTC 2021

Hi Erik,

This sounds good but is there a tutorial description of how this works 
in terms of your local branches? I can't quite see how to construct this 
from the point where I'm in my local branch for which the PR has just 
been created and I have the realization "shoot I need to refactor xyz 
first". How do I proceed from there?


On 23/03/2021 5:41 pm, Erik Helin wrote:
> Hi all,
> me and Robin are looking to deploy a new feature for the jdk [0] 
> repository this week: dependent pull requests. Dependent pull requests 
> are used when you have a change that depends on work in a pull request 
> that is not yet integrated.
> For an example, lets say that you are fixing a bug and realize that you 
> first need to refactor a piece of code in order to make the bugfix 
> cleaner. To aid reviewers you do *not* want to create a pull request 
> containing both the refactoring and the bugfix - they are distinct 
> changes and should be reviewed independently. You create a pull request 
> for the first change, the refactoring, but then what? You cannot create 
> a pull request for the bugfix only since the refactoring is not yet 
> integrated. The review of the refactoring might take a while and during 
> this time you cannot receive reviews for the bugfix.
> Dependent pull requests will help in the above scenario. When a pull 
> request is created then the Skara bots will automatically create a 
> branch in the upstream repository named `pr/<ID>` where `<ID>` is the id 
> of the pull request (e.g. `17`). This `pr/<ID>` branch can then be used 
> as the target branch when creating a pull request. A pull request with a 
> dependency is automatically targeted to the dependency's target branch 
> when the dependency is integrated. For example, if the first pull 
> request (with id `17`) targets the `master` branch and the second pull 
> request targets the `pr/17` branch, then the second pull request will be 
> automatically re-targeted to the `master` branch when the first pull 
> request (with id `17`) is integrated. It is not possible to integrate a 
> pull request with a dependency on an open pull request (i.e. the 
> dependency must be integrated first). The branches named `pr/<ID>` are 
> automatically removed when the corresponding pull request is closed.
> Dependent pull requests have been enabled for a long time for the skara 
> repository [1] and an example of a pull request with a dependency can be 
> seen here [2].
> For those of you using the Skara CLI tools [3] then `git-sync` will by 
> default *not* sync branches named `pr/<ID>` to the personal fork. If it 
> did then you would have to delete all `pr/<ID>` branches in your 
> personal fork yourself. This default behavior can be overridden by 
> passing `--branches` to `git-sync`.
> Let us know on the skara-dev [4] mailing list if you have any questions!
> Thanks,
> Erik and Robin
> [0]:
> [1]:
> [2]:
> [3]:
> [4]:

More information about the skara-dev mailing list