Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 60ad6ae

Browse files
committed
Extend debugging
1 parent 903cb16 commit 60ad6ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tools/ci/debug_deploy.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
import requests
77

8-
def gh_request(method_name, url, body=None):
8+
def gh_request(method_name, url, body=None, accept=None):
99
github_token = os.environ.get('GITHUB_TOKEN')
1010

1111
kwargs = {
1212
'headers': {
1313
'Authorization': 'token {}'.format(github_token),
14-
'Accept': 'application/vnd.github.v3+json'
14+
'Accept': accept or 'application/vnd.github.v3+json'
1515
}
1616
}
1717
method = getattr(requests, method_name.lower())
@@ -47,7 +47,8 @@ def gh_request(method_name, url, body=None):
4747
gh_request(
4848
'POST',
4949
'{}/deployments/{}/statuses'.format(url_base, data['deployment']['id']),
50-
{'state': 'pending'}
50+
{'state': 'pending', 'description': 'foo', 'environment_url': 'http://example.com'},
51+
'application/vnd.github.ant-man-preview+json'
5152
)
5253

5354
gh_request(

0 commit comments

Comments
 (0)