[gnome-build-meta/abderrahim/update-refs-script] test
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/abderrahim/update-refs-script] test
- Date: Tue, 4 Oct 2022 14:54:29 +0000 (UTC)
commit 83e47097a68df2eb077754bb2977e711e3b0fb08
Author: Jordan Petridis <jordan centricular com>
Date: Tue Oct 4 16:44:26 2022 +0200
test
.gitlab-ci.yml | 7 +++++++
utils/check_updates.py | 13 +++++++++++++
2 files changed, 20 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 70415a420..ccaf98234 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -521,6 +521,13 @@ test-pinephone-pro-aarch64:
- aarch64
- gnome-build-meta
+update_refs:
+ stage: 'track'
+ script:
+ - python3 utils/check_updates.py
+ - python3 utils/update-refs.py
+ - git push -o merge_request.create -o merge_request.assign=44433 -o merge_request.remove_source_branch
+
pages:
stage: 'reports'
diff --git a/utils/check_updates.py b/utils/check_updates.py
new file mode 100644
index 000000000..08d0c031f
--- /dev/null
+++ b/utils/check_updates.py
@@ -0,0 +1,13 @@
+import requests
+import os
+
+headers = {'JOB_TOKEN': os.environ["CI_JOB_TOKEN"] }
+# FIXME:
+url = f"https://gitlab.gnome.org/api/v4/projects/456/merge_requests?author_username=bertob&state=opened"
+resp = requests.get(url, headers=headers)
+print(resp.json())
+resp.raise_for_status()
+
+if not resp.json():
+ print("There's an existing MR already. Exiting!")
+ exit(1)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]