Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action fails on when PR's base ref exists as a branch but not a PR #36

Closed
tranhl opened this issue Jul 11, 2024 · 1 comment
Closed
Labels
bug Something isn't working
Milestone

Comments

@tranhl
Copy link
Collaborator

tranhl commented Jul 11, 2024

Given this branch stack, with no PRs created for any branch:

  • main
    • parent-branch
      • child-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.

@tranhl tranhl changed the title Action fails on when PR' Action fails on when PR's base ref exists as a branch but not a PR Jul 11, 2024
@tranhl tranhl added this to the v1.0 milestone Jul 11, 2024
@tranhl tranhl added the bug Something isn't working label Jul 11, 2024
@tranhl
Copy link
Collaborator Author

tranhl commented Dec 2, 2024

Fixed in #44

@tranhl tranhl closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant