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

Commit b4953a4

Browse files
committed
Fix the other things
1 parent 384e6a9 commit b4953a4

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

.github/workflows/detect_pull_request_preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
run: pip install requests
1010
- name: Detect deployment
1111
run:
12-
./tools/ci/debug_deploy.py
12+
./tools/ci/pr_preview.py
1313
--host https://api.github.com
1414
--github-project web-platform-tests/wpt-actions-test
1515
detect

tools/ci/pr_preview.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def gh_request(method_name, url, body=None, media_type=None):
4949
kwargs['json'] = body
5050

5151
logger.info('Issuing request: %s %s', method_name.upper(), url)
52-
logger.info(json.dumps(kwargs, indent=2))
5352

5453
resp = method(url, **kwargs)
5554

@@ -322,22 +321,11 @@ def detect(host, github_project, target, timeout):
322321
logger.info('Deployment environment is unrecognized. Exiting.')
323322
return
324323

325-
message = 'Waiting up to %d seconds for deployment %s to be available on %s'
326-
logger.info(
327-
message,
328-
timeout,
329-
deployment['environment'],
330-
target
324+
message = 'Waiting up to {} seconds for deployment {} to be available on {}'.format(
325+
timeout, deployment['environment'], target
331326
)
332-
result = project.update_deployment(target, deployment, 'pending', message)
333-
logger.info(json.dumps(result, indent=2))
334-
335-
url_base = 'https://api.github.com/repos/web-platform-tests/wpt-actions-test'
336-
result = gh_request(
337-
'GET',
338-
'{}/deployments/{}/statuses'.format(url_base, deployment['id'])
339-
)
340-
logger.info('Result: %s', json.dumps(result, indent=2))
327+
logger.info(message)
328+
project.update_deployment(target, deployment, 'pending', message)
341329

342330
start = time.time()
343331

0 commit comments

Comments
 (0)