There are some bots that apply changes to repos in gerrit and afterwards git a CR+2 to their changes (e.g. ‘libraryupgrader’, ‘translatewiki’, …).
I’ve found the following implementation: https://github.com/wikimedia/labs-libraryupgrader/blob/485fae291a6e5d443218115a043e81b80ff3d26b/container/thing.py#L78-L81
But when I try to run
git push origin refs/for/REL1_31%topic=Some_topic_branch,l=Code-Review+2
or
git push ssh://myuser@gerrit.wikimedia.org:29418/mediawiki/extensions/MyRepo refs/for/REL1_31%topic=Some_topic_branch,l=Code-Review+2
I receive
remote: Processing changes: refs: 1, done
To ssh://myuser@gerrit.wikimedia.org:29418/mediawiki/extensions/MyRepo
! [remote rejected] HEAD -> refs/for/REL1_31%topic=Some_topic_branch,l=Code-Review+2 (no new changes)
I would have expected to run into a permission issue because my user may not be allowed to push, but this error message suggests something else.
Can anyone give me an advice please?