summaryrefslogtreecommitdiff
path: root/.ci/scripts/merge/check-label-presence.py
diff options
context:
space:
mode:
Diffstat (limited to '.ci/scripts/merge/check-label-presence.py')
-rw-r--r--.ci/scripts/merge/check-label-presence.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/.ci/scripts/merge/check-label-presence.py b/.ci/scripts/merge/check-label-presence.py
new file mode 100644
index 000000000..048466d7e
--- /dev/null
+++ b/.ci/scripts/merge/check-label-presence.py
@@ -0,0 +1,18 @@
1# Checks to see if the specified pull request # has the specified tag
2# Usage: python check-label-presence.py <Pull Request ID> <Name of Label>
3
4import requests, json, sys
5
6try:
7 url = 'https://api.github.com/repos/yuzu-emu/yuzu/issues/%s' % sys.argv[1]
8 response = requests.get(url)
9 if (response.ok):
10 j = json.loads(response.content)
11 for label in j["labels"]:
12 if label["name"] == sys.argv[2]:
13 print('##vso[task.setvariable variable=enabletesting;]true')
14 sys.exit()
15except:
16 sys.exit(-1)
17
18print('##vso[task.setvariable variable=enabletesting;]false')