-
Notifications
You must be signed in to change notification settings - Fork 19
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
Updating a PR metadata before git-push is not possible in some cases #395
Comments
I guess we can check if the branch order is the same as the current local branch order. This won't detect all the cases that GH would recognize there's no new commit, but should cover some. |
Hi @draftcode, i'm pleased to meet you. I've been assigned to this issue by @jainankit and trying to replicate the issue on my end. I have followed the video in https://docs.aviator.co/aviator-cli and here's the result by running
I run these commands to swap the branches order
Then i run
Please kindly confirm if i reproduce the issue correctly. Thanks! |
Yeah. That's the issue. |
Thank you for your confirmation @draftcode. I have working on the solution but i just want to confirm if my approach is correct. In your comment above
I wonder if after we find out that the orders are different between local and remote, then what is the suggested next step? My thought based on my experiment at wahyudibo/test-aviator-av#1: since we're updating PR before pushing it to github,
In my testing repo, i create 2 branch stack (main > backend-1 > frontend-change), reorder them using Please let me know if this makes sense or not and if you have further suggestion. |
Hi @wahyudibo your strategy sounds good to me. I suspect that this will be a very rare scenario, so handling the failure gracefully, and fixing the PR metadata after push is a decent fallback. Just want to make sure that you are not expecting the user to run |
Thank you @jainankit for your feedback.
Yes, i just want to highlight that the process of running |
In #352, we switched to call GitHub API to update the PR metadata first, then doing a git-push. This is to make sure that a CI service sees the base branch data correctly.
However, if a branch order is swapped, the PR metadata cannot be updated. When a stack is like
main <- feature1 <- feature2
originally, and then swapped the feature1 and feature2 (main <- feature2 <- feature1
), without a git-push beforehand, GitHub recognizes that there's no new commit between feature2 and feature1 (because GH is still recognizing them based on the pre-reorder state), rejecting the API request.The text was updated successfully, but these errors were encountered: