diff options
author | Lidi Zheng <lidiz@google.com> | 2018-12-18 14:24:58 -0800 |
---|---|---|
committer | Lidi Zheng <lidiz@google.com> | 2018-12-18 14:24:58 -0800 |
commit | 886a932a1a09a567bd790ea949d9ccc9df86cdba (patch) | |
tree | 5c7da4d51ad3baa364ca97c5fcc2421bcf90dba6 /tools/run_tests/python_utils | |
parent | 3347158533460f15bc1621a2ed0c6d298a82e339 (diff) |
Use KOKORO_GITHUB_PULL_REQUEST_NUMBER instead of ghprbPullId
Diffstat (limited to 'tools/run_tests/python_utils')
-rw-r--r-- | tools/run_tests/python_utils/check_on_pr.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/run_tests/python_utils/check_on_pr.py b/tools/run_tests/python_utils/check_on_pr.py index d59f99b252..3f335c8ea9 100644 --- a/tools/run_tests/python_utils/check_on_pr.py +++ b/tools/run_tests/python_utils/check_on_pr.py @@ -71,8 +71,9 @@ def _call(url, method='GET', json=None): def _latest_commit(): - resp = _call('/repos/%s/pulls/%s/commits' % (_GITHUB_REPO, - os.environ['ghprbPullId'])) + resp = _call('/repos/%s/pulls/%s/commits' % + (_GITHUB_REPO, + os.environ['KOKORO_GITHUB_PULL_REQUEST_NUMBER'])) return resp.json()[-1] @@ -82,7 +83,7 @@ def check_on_pr(name, summary, success=True): The check runs are aggregated by their name, so newer check will update the older check with the same name. - Requires environment variable 'ghprbPullId' to indicate which pull request + Requires environment variable 'KOKORO_GITHUB_PULL_REQUEST_NUMBER' to indicate which pull request should be updated. Args: @@ -96,8 +97,8 @@ def check_on_pr(name, summary, success=True): if 'KOKORO_KEYSTORE_DIR' not in os.environ: print('Missing KOKORO_KEYSTORE_DIR env var: not checking') return - if 'ghprbPullId' not in os.environ: - print('Missing ghprbPullId env var: not checking') + if 'KOKORO_GITHUB_PULL_REQUEST_NUMBER' not in os.environ: + print('Missing KOKORO_GITHUB_PULL_REQUEST_NUMBER env var: not checking') return completion_time = str( datetime.datetime.utcnow().replace(microsecond=0).isoformat()) + 'Z' |