From aa1a68763de729d3756cd3768b9290618a414229 Mon Sep 17 00:00:00 2001 From: Eleftheria Stein-Kousathana Date: Tue, 17 Dec 2024 15:34:54 +0100 Subject: [PATCH] Revert "Actually attempt to get the GitHub app's user ID (#5214)" This reverts commit 9286b3173e53065ad0ee4013cd09ea83bd86fd6a. --- internal/providers/github/clients/app.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/providers/github/clients/app.go b/internal/providers/github/clients/app.go index bf3b130578..b65d3a1e15 100644 --- a/internal/providers/github/clients/app.go +++ b/internal/providers/github/clients/app.go @@ -283,9 +283,7 @@ func (g *GitHubAppDelegate) ListAllRepositories(ctx context.Context) ([]*minderv // GetUserId returns the user id for the GitHub App user func (g *GitHubAppDelegate) GetUserId(ctx context.Context) (int64, error) { // Try to get this user ID from the GitHub API - //nolint:errcheck // this will never error - appUserName, _ := g.GetName(ctx) - user, _, err := g.client.Users.Get(ctx, appUserName) + user, _, err := g.client.Users.Get(ctx, "") if err != nil { // Fallback to the configured user ID // note: this is different from the App ID