From 08a08ecf69bf2a312e5aeff936d80ee6a5b2c286 Mon Sep 17 00:00:00 2001
From: Mathieu Kniewallner <mathieu.kniewallner@backmarket.com>
Date: Mon, 2 Sep 2024 19:27:26 +0200
Subject: [PATCH] fix(datasource/orb): retrieve more releases (#31165)

---
 lib/modules/datasource/orb/index.ts | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/modules/datasource/orb/index.ts b/lib/modules/datasource/orb/index.ts
index 2f2a1c20a7..12e3bc834d 100644
--- a/lib/modules/datasource/orb/index.ts
+++ b/lib/modules/datasource/orb/index.ts
@@ -4,13 +4,15 @@ import { Datasource } from '../datasource';
 import type { GetReleasesConfig, ReleaseResult } from '../types';
 import type { OrbResponse } from './types';
 
+const MAX_VERSIONS = 100;
+
 const query = `
-query($packageName: String!) {
+query($packageName: String!, $maxVersions: Int!) {
   orb(name: $packageName) {
     name,
     homeUrl,
     isPrivate,
-    versions {
+    versions(count: $maxVersions) {
       version,
       createdAt
     }
@@ -48,7 +50,7 @@ export class OrbDatasource extends Datasource {
     const url = `${registryUrl}graphql-unstable`;
     const body = {
       query,
-      variables: { packageName },
+      variables: { packageName, maxVersions: MAX_VERSIONS },
     };
     const res = (
       await this.http.postJson<OrbResponse>(url, {
-- 
GitLab