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

Base branch change on 'no change' part of the stack #52

Open
artempyanykh opened this issue Nov 23, 2024 · 1 comment
Open

Base branch change on 'no change' part of the stack #52

artempyanykh opened this issue Nov 23, 2024 · 1 comment

Comments

@artempyanykh
Copy link

Hey! Thanks for releasing stack-pr, I'm really enjoying it ❤️

I do have a question/comment – when I amend a local commit in the middle of the stack and then run stack-pr submit, I'd expect that unchanged commits/PRs (at least those coming before the amended one) shouldn't have to be updated on GH. Is this fair?

Right now this doesn't seem to be the case. Details below re: the "base branch" part, but I think this is a part of a more general topic of checking if something's no-op and reducing the noise in PRs.

Details:

I have the following stack: artempyanykh/marksman#366

The sequence of steps is:
1] stack-pr submit
2] amend the local commit corresponding to 2nd from the top #368

Screenshot 2024-11-23 at 11 12 18
  1. stack-pr submit

I see that 2nd from the bottom got its base branch updated
Screenshot 2024-11-23 at 11 12 28

@ZolotukhinM
Copy link
Collaborator

Thanks for the kind words :)

Some updates still need to be done even for PRs lower in the stack - e.g. we need to update the PR description to include a link to the new PR. But you're correct that for that alone we ideally shouldn't have to change base branch back and forth.

However, not doing that is not always that simple: the reason we set base branches for all PRs in the stack before the update to main is to prevent GitHub from accidental closes of PRs when they are reordered in the stack (GH will close if base branch gets ahead of PR branch). There are some more details on that nuance here: #29 (comment)

It should be possible to avoid some of these updates though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants