WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.52k stars 999 forks source link

Gerrit-integration: provide a way to add topic and/or hashtags (ignores branch%topic=foo in push-branch) #10624

Open cloph opened 9 months ago

cloph commented 9 months ago

Describe the problem

Pushing to gerrit will likely trigger CI actions and depending on the project size those can be quite expensive, and usually translation updates won't be tested or don't need to be tested with every update to a patch/once when merged is enough.

Using a topic or keywords can be used as a generic way to skip CI actions or phases without having the need to add the weblate committer and other bot accounts into the CI rules

Describe the solution you'd like

simplest way would be if weblate would pass the push-branch, using branchname%topic=topiclabel would be the way to add a topic to a change while pushing to gerrit https://gerrit-review.googlesource.com/Documentation/intro-user.html#topics

similarly keywords/hashtags can be added using the same way

Describe alternatives you've considered

alternatives would be different input options allowing to specify topic (single value) and/or hashtags (can be multi-value, however hashtags aren't part of e.g. jenkins gerrit-trigger filters, so less useful for controlling CI in this case)

Screenshots

No response

Additional context

No response

nijel commented 9 months ago

Weblate currently invokes git review --yes:

https://github.com/WeblateOrg/weblate/blob/6fc31963ce13913c930d790e9f9a0106c7a63231/weblate/vcs/git.py#L541-L548

Would adding --topic=weblate address your issue? Is adding of a label likely to break some existing workflows?

github-actions[bot] commented 2 months ago

This issue has been put aside. It is currently unclear if it will ever be implemented as it seems to cover too narrow of a use case or doesn't seem to fit into Weblate.

Please try to clarify the use case or consider proposing something more generic to make it useful to more users.