mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
Merge pull request #33151 from ClickHouse/add_pretty_print
Debugging PR info
This commit is contained in:
commit
20c0599751
@ -44,14 +44,14 @@ class PRInfo:
|
||||
self.changed_files = set([])
|
||||
|
||||
# workflow completed event, used for PRs only
|
||||
if github_event['action'] == 'completed':
|
||||
if 'action' in github_event and github_event['action'] == 'completed':
|
||||
self.sha = github_event['workflow_run']['head_sha']
|
||||
prs_for_sha = requests.get(f"https://api.github.com/repos/{GITHUB_REPOSITORY}/commits/{self.sha}/pulls").json()
|
||||
if len(prs_for_sha) != 0:
|
||||
github_event['pull_request'] = prs_for_sha[0]
|
||||
|
||||
if 'pull_request' in github_event: # pull request and other similar events
|
||||
self.number = github_event['number']
|
||||
self.number = github_event['pull_request']['number']
|
||||
if 'after' in github_event:
|
||||
self.sha = github_event['after']
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user