ClickHouse/tests/ci/commit_status_helper.py

14 lines
417 B
Python
Raw Normal View History

2021-11-12 12:36:25 +00:00
#!/usr/bin/env python3
2021-11-26 14:00:09 +00:00
from env_helper import GITHUB_REPOSITORY
2021-11-12 12:36:25 +00:00
def get_commit(gh, commit_sha):
2021-11-26 14:00:09 +00:00
repo = gh.get_repo(GITHUB_REPOSITORY)
2021-11-12 12:36:25 +00:00
commit = repo.get_commit(commit_sha)
return commit
def post_commit_status(gh, sha, check_name, description, state, report_url):
commit = get_commit(gh, sha)
commit.create_status(context=check_name, description=description, state=state, target_url=report_url)