Forum Discussion

stef_filion's avatar
stef_filion
Occasional Visitor
10 years ago

Access to a custom field using the ccollab batch command

I'm using the gerrit style script to do our reviews.  We wnat to use that script with a multiple repos.  For that reason I created a new Review Custom Field.  What I would like to know is how can I set that my custom field in my batch script.  There is the part of my script I'm using:

 

review_id=$($ccollab --quiet admin batch - <<ccollabBatchXml
<batch-commands>

<!-- Add Commit to Review -->
<addchangelist>

<!-- Specify Review ID to add to, or "new" to create new Review -->
<review>$review_id</review>

<changelist>$new_rev</changelist>

</addchangelist>

<!-- Output Review ID, in case we created a new one -->
<admin_review-xml>

<!-- "last" means the Review we referenced/created with the addchangelist command. -->
<!-- Note we have to do this in the same "ccollab admin batch" script to ensure -->
<!-- the "last" variable does not get overrwritten by a concurrent process. -->
<review>last</review>

<!-- Output just the Review ID -->
<xpath>string(//reviews/review/@reviewId)</xpath>

</admin_review-xml>

</batch-commands>
ccollabBatchXml
)

 

 

Thanks

No RepliesBe the first to reply