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

branch submit: better error message if base hasn't been submitted #460

Open
abhinav opened this issue Nov 4, 2024 · 1 comment
Open
Labels
area/forge Issues heavy on dealing with Forges. bug Something isn't working

Comments

@abhinav
Copy link
Owner

abhinav commented Nov 4, 2024

When base branch is non-trunk, but hasn't been submitted, GitHub will reject the submission in gs branch submit because it doesn't know the base ref and won't see any commits between base and head.

The error takes the form:

Head sha can't be blank, Base sha can't be blank, No commits between [...] and [...], Base ref must be a branch

gs branch submit should confirm that non-trunk base has been submitted before it submits the current branch, while still allowing for --no-publish for non-GitHub workflows.

@abhinav abhinav added the bug Something isn't working label Nov 4, 2024
abhinav added a commit that referenced this issue Nov 27, 2024
abhinav added a commit that referenced this issue Nov 27, 2024
abhinav added a commit that referenced this issue Nov 27, 2024
@abhinav
Copy link
Owner Author

abhinav commented Dec 9, 2024

This error also occurs when base has been submitted and merged (and deleted server-side), but local hasn't synced yet.

So it can't be a naive approach like #499 where we just check if the base branch is submitted.
We'll need to look at the GitHub error code.

@abhinav abhinav added the area/forge Issues heavy on dealing with Forges. label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/forge Issues heavy on dealing with Forges. bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant