Skip to content

Commit

Permalink
Fixed lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
avas27JTG committed Nov 28, 2023
1 parent 56e3e83 commit a20d986
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/plugin/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a20d986

Please sign in to comment.