Projects that decide to organize the source code of a complex system into different repos usually use the Git submodule feature to put the repos together into a system. Any change thus requires more than one branch and pull request:
- one or more feature branches and pull requests in the child repos where the real changes are being made
- a feature branch and pull request in the parent repo, which is changed to reflect the configuration of the system with the new commits in the child repos
BBS is not currently supporting this use case well, since it doesn't recognize the parent/child relationship of the branches and pull requests.
- The user can easily create a branch in a child repo via a branch in the parent repo. Example: The user selects a given feature branch in the parent repo in BBS and selects the menu entry "Create submodule branches". The result is one or more new branches in the specified child repos. BBS regards these branches as "submodule branches" and notes that they are related to the branch in the parent repo. The branch page in the parent repo displays related submodule branches and vice-versa.
- Submodule branches are listed in the pull request for the parent branch and the user can easily create new pull requests in the child repos. Example: Having created a pull request in the parent repo, the user sees the submodule branches and creates pull requests in them from the parent pull request. The branches with new commits are specially marked to make it obvious where pull requests are needed. A convenience option such as "Create pull requests for submodules" could create pull requests in all submodule branches that have commits but lack pull requests.
- The resulting pull requests in the child repos are displayed in the parent pull request. The user can thus easily see the related pull requests, as well as their statuses, and conveniently navigate among them. The pull requests in the child repos also show their relationship to the parent pull request, making it convenient to navigate to the parent request.
- The diff section of the parent pull request provides an option to show the actual diffs in the child repos.
- A pull request option is provided that blocks merging a pull request in the parent repo if there are unmerged submodule pull requests.
- The BBS api provides a way to find the parent of a submodule pull request and vice-versa. Same for submodule branches.
The GUI could be modelled on the Jira issue/subtask feature.
Instead of having separate pull requests in the child repos, there is just one pull request in the parent repo, covering all the changes. This is probably preferable to the above solution, since it saves the user the trouble of moving between different pull requests and keeps the review in one place.
- is related to
BSERV-4198 Show submodule changes in diff
- Gathering Interest