From a6219c84c932c19b5359a8028dfdf248c8d6ca36 Mon Sep 17 00:00:00 2001
From: Max Gautier <mg@max.gautier.name>
Date: Mon, 16 Dec 2024 16:21:48 +0100
Subject: [PATCH] Put graphql query in it's own file

---
 scripts/list_releases.graphql | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 scripts/list_releases.graphql

diff --git a/scripts/list_releases.graphql b/scripts/list_releases.graphql
new file mode 100644
index 000000000..6a2d225f1
--- /dev/null
+++ b/scripts/list_releases.graphql
@@ -0,0 +1,29 @@
+query($repoWithReleases: [ID!]!, $repoWithTags: [ID!]!) {
+  with_releases: nodes(ids: $repoWithReleases) {
+
+    ... on Repository {
+      nameWithOwner
+      releases(first: 100) {
+        nodes {
+          tagName
+          isPrerelease
+          releaseAssets {
+            totalCount
+          }
+        }
+      }
+    }
+  }
+
+  with_tags: nodes(ids: $repoWithTags) {
+
+    ... on Repository {
+      nameWithOwner
+      refs(refPrefix: "refs/tags/", last: 100) {
+        nodes {
+          name
+        }
+      }
+    }
+  }
+}
-- 
GitLab