-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Addon - Squash Git commits - commit messages and authors are not preserved #12232
Comments
The only way to include authorship when squashing across authors in including this in the trailers, that's what you see in the |
Using |
Ah, the issues is that these are missing in keycloak/keycloak@1a3ddc9. It appears that Weblate was unable to correctly assign this to existing translation and committed that as leftover files here: Lines 249 to 256 in 10fea1e
I think this is caused by the add-on being executed with a linked component and not the main one because of project-wide install and that should be fixed. |
Something like 8c66d1d will be needed for this event (or generalize the solution for repository scoped add-ons). |
We need a more generic approach to avoid handling this per signal and add-on. See WeblateOrg#12232
These should not be executed on linked components, but only on the main one. This is generic solution to the problem replacing previous specific solution to single event and add-on. Fixes WeblateOrg#12232 Fixes WeblateOrg#10892
We need a more generic approach to avoid handling this per signal and add-on. See WeblateOrg#12232
These should not be executed on linked components, but only on the main one. This is generic solution to the problem replacing previous specific solution to single event and add-on. Fixes WeblateOrg#12232 Fixes WeblateOrg#10892
We need a more generic approach to avoid handling this per signal and add-on. See #12232
Thank you for your report; the issue you have reported has just been fixed.
|
Thank you for this fix. To try it out on the hosted service on weblate.org, I assume I'll need to wait for Weblate 5.7 to be released and then installed on weblate.org? Waiting is ok for me, I just need to know when to try it out. In the meantime, I've subscribed to the releases of this repository to get a notification upon release. |
AFAIK it should be already deployed on Hosted Weblate. |
Describe the issue
I want to have one commit per language, and keep the authors. The docs gave me the impression that this should be possible (emphasis added by me):
I didn't find documentation on how to create a commit message that can be customized to include multiple authors, so I left it blank, hoping for the best as "Append trailers to squashed commit message" was enabled.
No luck here - I now only get a generic message "Updated by "Squash Git commits" hook in Weblate.", but only on the second time I trigger the push to the target repository.
I already tried
Steps to reproduce the behavior
keycloak/keycloak@d42a2c4
keycloak/keycloak@30f0a07 + keycloak/keycloak@30f0a07
Expected behavior
As both commits changed the same language but different components, I would have expected to see only one commit.
As I check the "append trailers", I expected the authors to be kept.
Screenshots
No response
Exception traceback
No response
How do you run Weblate?
weblate.org service
Weblate versions
No response
Weblate deploy checks
No response
Additional context
Looking at the code of the extension, it seems to me that there is some very different handling for the per-author setup - https://github.com/WeblateOrg/weblate/blob/main/weblate/addons/git.py.
As I fallback, I am reverting to the "per author" commit squashing, which works better for me, although I would still like to see one commit per language that then lists all the authors that contributed to it.
For me the one-commit-per-language would be the input for some follow-up processing of having one-PR-per-language as described in #5563
If the way I'm trying to use it is not the way it is intended to be used, I'd be happy to see a docs change. It would be great to understand how a template for "Original commit messages are kept [if] the commit message is customized to include it" would work, together with "Append trailers to squashed commit message".
The text was updated successfully, but these errors were encountered: