mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Parse json from response
This commit is contained in:
parent
a857b895d4
commit
19e690f86a
@ -38,11 +38,16 @@ class PRInfo:
|
||||
self.labels = {}
|
||||
if need_changed_files:
|
||||
commit_before = github_event['before']
|
||||
diff = requests.get(f'https://api.github.com/repos/ClickHouse/ClickHouse/compare/{commit_before}...{self.sha}')
|
||||
response = requests.get(f'https://api.github.com/repos/ClickHouse/ClickHouse/compare/{commit_before}...{self.sha}')
|
||||
response.raise_for_status()
|
||||
diff = response.json()
|
||||
|
||||
if 'files' in diff:
|
||||
self.changed_files = [f['filename'] for f in diff['files']]
|
||||
else:
|
||||
self.changed_files = set([])
|
||||
else:
|
||||
self.changed_files = set([])
|
||||
else:
|
||||
raise Exception("Cannot detect type of event")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user