From b77dbf239ac3cc78a8acc15e119b1375127f1b5b Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 4 Oct 2024 14:09:59 -0700 Subject: [PATCH] merge with Arins branch --- src/Octoshift/Services/GithubClient.cs | 27 -------------------------- 1 file changed, 27 deletions(-) diff --git a/src/Octoshift/Services/GithubClient.cs b/src/Octoshift/Services/GithubClient.cs index 57b1fdb92..10c52390e 100644 --- a/src/Octoshift/Services/GithubClient.cs +++ b/src/Octoshift/Services/GithubClient.cs @@ -73,33 +73,6 @@ public virtual async IAsyncEnumerable GetAllAsync( nextUrl = GetNextUrl(headers); } while (nextUrl != null); } - - public virtual async IAsyncEnumerable GetAllAsyncGroupId(string url, Dictionary customHeaders = null) - { - var nextUrl = url; - do - { - var (content, headers) = await GetWithRetry(nextUrl, customHeaders: customHeaders); - // Parse the response and check if "groups" exists - var jObject = JObject.Parse(content); - var jResponse = jObject["groups"]; - - if (jResponse == null || !jResponse.HasValues) - { - yield break; // No groups found, exit the iterator - } - - // Yield each group - foreach (var jToken in jResponse) - { - yield return jToken; - } - - // Check for the next page URL - nextUrl = GetNextUrl(headers); - } while (nextUrl != null); - } - public virtual async Task PostAsync(string url, object body, Dictionary customHeaders = null) => (await SendAsync(HttpMethod.Post, url, body, customHeaders: customHeaders)).Content;