-
-
Notifications
You must be signed in to change notification settings - Fork 958
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
Github Web UI shows weblate PRs strangely (unexpected commits are listed) #5051
Comments
It indeed looks wrong. Were there any force pushes to the repo? That would explain that GitHub doesn't match the commits which are already part of the upstream repo. |
This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you! |
No, we do not force-push to our main branch, and only weblate pushes to its PR branch. Adafruit are paid users on hosted weblate, thank you very much, we're thrilled with the service. |
Sorry for asking, the force pushes are usual suspects in this situation, so I had to ask about that. Looking at the merge commit, the extra commits were not there:
So, this really boils down to figuring out why GitHub interprets it the way it did. Maybe the merge commits in between did confuse it. We already have custom merge logic to avoid this, but maybe GitHub implementation has changed meanwhile. The merge logic is here: Lines 158 to 180 in aeede8d
You might want to switch to using rebase instead of merge in Weblate, that usually works well with pull requests (we're using it on Weblate as well). |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further action occurs. Thank you for your contributions! |
We want to move off of rebase because our CI is slow (>1 hour). Merge allows us to see the CI history of the branch and see if it passed previously. Are you sure 14294e4 is still correct and not just a fix against a github bug? Merging the weblate changes into the upstream branch seems incorrect to me. Usually updating a feature branch is done by merging the main branch into it. (The order matters because the first parent is treated differently than the second.) |
No, I'm not certain, but I think there are two different things here. The above commit addressed merge commit happening inside Weblate to show that Weblate changes are being merged into master and that IMHO works correctly (see for example adafruit/circuitpython@e58c385). The root cause probably is how does the final merging happen:
Unfortunately, GitHub doesn't support fast-forward merges in the UI (GitLab does), so most people merging on GitHub will get it wrong. What we can do is using simple merge when GitHub integration is used... |
Oh interesting! I didn't realize it was the PR merge direction that factored into it. Yes, we always merge using GitHub in our repo so that could be the issue. |
Thank you for your report, the issue you have reported has just been fixed.
|
Thanks again for fixing this! It's been much more pleasant to review the PRs from Weblate now. |
Describe the bug
In our project, we prefer to have weblate use the "merge" style to incorporate changes from our main development branch. Unfortunately, github ends up showing commits already present in the main branch within the pull request! Here's one such pull request in our project's history: adafruit/circuitpython#3792
To Reproduce the bug
Here's the configuration and sequence of events that seem to happen:
Expected behavior
Only commits created by weblate are shown, not commits and changes from the main branch.
** Actual behavior **
Commits (and their changes) created by merging other PRs are visible in Weblate's PR
Screenshots
See adafruit/circuitpython#3792
Server configuration and status
Weblate installation: Hosted weblate
Additional context
I first assumed this was a Github problem, but I manually created a PR adafruit/circuitpython#3827 that goes through the same steps and github displays the PR as I expect, without listing commits from the main branch and the changes in those commits. So the next hypothesis is that something is different about a weblate git merge than the one I did locally. However, I can't see anything specifically different in
git show --format=fuller
. Pulling down the PR branch locally and looking atgit diff
andgit stat
, everything looks right. So I'm puzzled, and still not 100% sure it's Weblate that is "in the wrong" here. But this is negatively affecting our ability to review & approve translation PRs so I wanted to raise the issue here.The text was updated successfully, but these errors were encountered: