-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Given this branch stack, with no PRs created for any branch:
mainparent-branchchild-branch
If a PR is created for child-branch, the action will fail be because parent-branch does not have an associated PR. This happens because the action uses the repo's pull requests when building up the stack graph. To fix this, we should first add all branches in the repository as nodes on the graph, even if they don't appear in PRs, so that leafs can be properly connected when iterating through the pull requests.
Is also related to #34, as we will need to handle pagination to make sure that we have a full list of branches for the repository. This doesn't scale very well for large repositories (e.g. monorepos), but it's better than the action failing and not producing a branch stack at all.