mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 10:18:38 +00:00
Enable more revive
linter rules (#30608)
Noteable additions: - `redefines-builtin-id` forbid variable names that shadow go builtins - `empty-lines` remove unnecessary empty lines that `gofumpt` does not remove for some reason - `superfluous-else` eliminate more superfluous `else` branches Rules are also sorted alphabetically and I cleaned up various parts of `.golangci.yml`.
This commit is contained in:
@@ -274,14 +274,12 @@ func newDiscordRequest(ctx context.Context, w *webhook_model.Webhook, t *webhook
|
||||
|
||||
func parseHookPullRequestEventType(event webhook_module.HookEventType) (string, error) {
|
||||
switch event {
|
||||
|
||||
case webhook_module.HookEventPullRequestReviewApproved:
|
||||
return "approved", nil
|
||||
case webhook_module.HookEventPullRequestReviewRejected:
|
||||
return "rejected", nil
|
||||
case webhook_module.HookEventPullRequestReviewComment:
|
||||
return "comment", nil
|
||||
|
||||
default:
|
||||
return "", errors.New("unknown event type")
|
||||
}
|
||||
|
Reference in New Issue
Block a user