summaryrefslogtreecommitdiff
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.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/.ci/scripts/merge/apply-patches-by-label.py b/.ci/scripts/merge/apply-patches-by-label.py
index e81db9287..43ed74d7f 100644
--- a/.ci/scripts/merge/apply-patches-by-label.py
+++ b/.ci/scripts/merge/apply-patches-by-label.py
@@ -14,11 +14,13 @@ def check_individual(labels):
14 return True 14 return True
15 return False 15 return False
16 16
17try: 17def do_page(page):
18 url = 'https://api.github.com/repos/yuzu-emu/yuzu/pulls' 18 url = 'https://api.github.com/repos/yuzu-emu/yuzu/pulls?page=%s' % page
19 response = requests.get(url) 19 response = requests.get(url)
20 if (response.ok): 20 if (response.ok):
21 j = json.loads(response.content) 21 j = json.loads(response.content)
22 if j == []:
23 return
22 for pr in j: 24 for pr in j:
23 if (check_individual(pr["labels"])): 25 if (check_individual(pr["labels"])):
24 pn = pr["number"] 26 pn = pr["number"]
@@ -26,5 +28,9 @@ try:
26 print(subprocess.check_output(["git", "fetch", "https://github.com/yuzu-emu/yuzu.git", "pull/%s/head:pr-%s" % (pn, pn), "-f"])) 28 print(subprocess.check_output(["git", "fetch", "https://github.com/yuzu-emu/yuzu.git", "pull/%s/head:pr-%s" % (pn, pn), "-f"]))
27 print(subprocess.check_output(["git", "merge", "--squash", "pr-%s" % pn])) 29 print(subprocess.check_output(["git", "merge", "--squash", "pr-%s" % pn]))
28 print(subprocess.check_output(["git", "commit", "-m\"Merge %s PR %s\"" % (tagline, pn)])) 30 print(subprocess.check_output(["git", "commit", "-m\"Merge %s PR %s\"" % (tagline, pn)]))
31
32try:
33 for i in range(1,30):
34 do_page(i)
29except: 35except:
30 sys.exit(-1) 36 sys.exit(-1)