sputnik icon indicating copy to clipboard operation
sputnik copied to clipboard

Allow specifying Gerrit review by full revision path

Open marquiswang opened this issue 3 years ago • 0 comments

Right now, Sputnik requires two parameters, the changeId and commitId to report to Gerrit:

sputnik --conf /path/to/conf.properties --changeId I0a2afb7ae4a94ab1ab473ba00e2ec7de381799a0 --revisionId 3f37692af2290e8e3fd16d2f43701c24346197f0

It turns out you can also use the change and revision's numeric ids

sputnik --conf /path/to/conf.properties --changeId 12345 --revisionId 5

However, with a lot of build setups, it is easiest to extract the identifier for the patchset as a single string "12345/5". You can get this out of the URI for a gerrit review, or from the ref in the Gerrit repo itself.

In my organization's build setup, the build configuration simply sees the branch as "12345/5".

Right now, we use a separate build step that splits this by the "/" and sets two build parameters for the changeId and revisionId. However, it would simplify the setup if we could just pass in --changeId 12345/5.

marquiswang avatar Oct 22 '21 16:10 marquiswang