workflow: add invoke-issue-restapi and invoke-project-restapi actions

The invoke-issue-restapi invokes RestAPI on the issue, it uses soy
template to generate the request.

   action = invoke-issue-restapi method uri passCodes template

The invoke-project-restapi is similar but invokes project method.

These commands enables advanced integration with most of JIRA features.

For example if you would like to create a link in issues to review, use
the following action:

  action = invoke-issue-restapi POST /remotelink 200,201 link

With the follwing `its/templates/` template:

  {namespace etc.its.templates}
  {template .link}
    {@param changeUrl: string}
    {@param subject: string}
    {@param status: string}
    "globalId": "{$changeUrl}",
    "application": {lb}
      "type": "com.googlesource.gerrit",
      "name": "Gerrit"
    "object": {lb}
      "url": "{$changeUrl}",
      "title": "{$subject}",
      "icon": {lb}
        "url16x16": "",
        "title": "Review"
      "status": {lb}
        {switch $status}
          {case null}
            "resolved": false
          {case 'NEW'}
            "resolved": false
          {case 'SUBMITTED'}
            "resolved": false
          {case 'MERGED'}
            "resolved": true
          {case 'ABANDONED'}
            "resolved": true

Change-Id: I617c110764d48ed9dd2162c5414945e0d7b9d90c
Signed-off-by: Alon Bar-Lev <>
9 files changed
tree: c55961cb975603669114fe57f2004f7fd8afbadb
  1. .settings/
  2. src/
  3. .gitignore
  4. BUILD
  5. external_plugin_deps.bzl