Fix incompatibility with gerrit 2.8

This change updates the gerrit hook scripts to be compatible with gerrit version 2.8

Closes-Bug: #1273947
Partial-Bug: #1082781

Change-Id: I529bb9fbded16ccafb020b4edc9eb2d5e641cbc7
3 files changed