mirror of
https://github.com/audacity/community.git
synced 2026-04-12 21:24:54 -05:00
auto-merge: receive up to 1000 checks
This commit is contained in:
20
.github/workflows/auto-merge.py
vendored
20
.github/workflows/auto-merge.py
vendored
@@ -112,17 +112,21 @@ print("")
|
||||
# Our CI runs are all qualifing as checks
|
||||
# Since PyGithub is not yet supporting checks, we have to use something else here
|
||||
# https://github.com/PyGithub/PyGithub/issues/1621
|
||||
# TODO: Use only PyGithub one it supports checks
|
||||
# TODO: Use only PyGithub once it supports checks
|
||||
|
||||
checks_api_call = subprocess.run(
|
||||
'curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/{}/commits/{}/check-runs'.format(REPOSITORY_SLUG, pr_latest_commit),
|
||||
capture_output=True,
|
||||
shell=True
|
||||
)
|
||||
checks = {}
|
||||
|
||||
checks_string = checks_api_call.stdout.decode("utf-8")
|
||||
# Read up to 1000 checks
|
||||
for page in range(1, 10):
|
||||
checks_api_call = subprocess.run(
|
||||
'curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/{}/commits/{}/check-runs?per_page=100&page={}'.format(REPOSITORY_SLUG, pr_latest_commit, page),
|
||||
capture_output=True,
|
||||
shell=True
|
||||
)
|
||||
|
||||
checks = json.loads(checks_string)
|
||||
checks_string = checks_api_call.stdout.decode("utf-8")
|
||||
|
||||
checks.update(json.loads(checks_string))
|
||||
|
||||
|
||||
checks_successful = 0
|
||||
|
||||
Reference in New Issue
Block a user