summaryrefslogtreecommitdiffstats
path: root/.ci/scripts/merge/apply-patches-by-label.py
diff options
context:
space:
mode:
Diffstat (limited to '.ci/scripts/merge/apply-patches-by-label.py')
-rw-r--r--.ci/scripts/merge/apply-patches-by-label.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/.ci/scripts/merge/apply-patches-by-label.py b/.ci/scripts/merge/apply-patches-by-label.py
index 7f1ea06cf..43ed74d7f 100644
--- a/.ci/scripts/merge/apply-patches-by-label.py
+++ b/.ci/scripts/merge/apply-patches-by-label.py
@@ -3,7 +3,7 @@
import requests, sys, json, urllib3.request, shutil, subprocess, os
-tagline = os.getenv("MergeTaglinePublic".upper(), "")
+tagline = sys.argv[2]
http = urllib3.PoolManager()
dl_list = {}
@@ -14,11 +14,13 @@ def check_individual(labels):
return True
return False
-try:
- url = 'https://api.github.com/repos/yuzu-emu/yuzu/pulls'
+def do_page(page):
+ url = 'https://api.github.com/repos/yuzu-emu/yuzu/pulls?page=%s' % page
response = requests.get(url)
if (response.ok):
j = json.loads(response.content)
+ if j == []:
+ return
for pr in j:
if (check_individual(pr["labels"])):
pn = pr["number"]
@@ -26,5 +28,9 @@ try:
print(subprocess.check_output(["git", "fetch", "https://github.com/yuzu-emu/yuzu.git", "pull/%s/head:pr-%s" % (pn, pn), "-f"]))
print(subprocess.check_output(["git", "merge", "--squash", "pr-%s" % pn]))
print(subprocess.check_output(["git", "commit", "-m\"Merge %s PR %s\"" % (tagline, pn)]))
+
+try:
+ for i in range(1,30):
+ do_page(i)
except:
sys.exit(-1)