[gnome-build-meta/abderrahim/update-refs-script] test



commit eddb714884a38b865e45fc354836d486f3494d50
Author: Jordan Petridis <jordan centricular com>
Date:   Tue Oct 4 16:44:26 2022 +0200

    test

 .gitlab-ci.yml         |  7 +++++++
 utils/check_updates.py | 11 +++++++++++
 2 files changed, 18 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..724da1262
--- /dev/null
+++ b/utils/check_updates.py
@@ -0,0 +1,11 @@
+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=alatieraa&state=opened";
+resp = requests.get(url, headers=headers)
+print(resp.json())
+
+if not resp.json():
+  exit(1)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]