From a20d986d7adc0f0c369e2ea5a14cad3dce2554f9 Mon Sep 17 00:00:00 2001 From: Abhishek Verma Date: Tue, 28 Nov 2023 16:47:51 +0530 Subject: [PATCH] Fixed lint. --- server/plugin/command.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/plugin/command.go b/server/plugin/command.go index d9af64113..e95a6d5d0 100644 --- a/server/plugin/command.go +++ b/server/plugin/command.go @@ -434,12 +434,12 @@ func (p *Plugin) handleSubscribesAdd(_ *plugin.Context, args *model.CommandArgs, subOrgMsg := fmt.Sprintf("Successfully subscribed to organization %s.", owner) - found, err := p.checkIfConfiguredWebhookExists(ctx, githubClient, repo, owner) - if err != nil { - if strings.Contains(err.Error(), "404 Not Found") { + found, foundErr := p.checkIfConfiguredWebhookExists(ctx, githubClient, repo, owner) + if foundErr != nil { + if strings.Contains(foundErr.Error(), "404 Not Found") { return errorWebhookToUser } - return errors.Wrap(err, "failed to get the list of webhooks").Error() + return errors.Wrap(foundErr, "failed to get the list of webhooks").Error() } if !found {