add_change_comment.py 535 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""
Add comments on gerrit
"""

import os
import sys
import jnk_grt_comment as jgc
import glob

CHANGE = os.environ.get('GERRIT_CHANGE_NUMBER') or None
PATCH = os.environ.get('GERRIT_PATCHSET_NUMBER') or None
URL = os.environ.get('BUILD_URL') or None

# print glob.glob("**/*-API.yaml")

if not (CHANGE and PATCH and URL):
    print "No Gerrit change information found. Exiting"
    sys.exit()

print "START Comment on Gerrit change ---"

jgc.comment_openapis_artifacts(CHANGE, PATCH, URL)

print "DONE Comment on Gerrit change ---\n"