Add support for snippet spam
The spamcheck service has been updated with a new model to detect spam in snippets. This MR updates the Snippet create/update functionality to check for spam using the newly available gRPC endpoint in spamcheck. Changelog: added
显示
- Gemfile 1 个添加, 1 个删除Gemfile
- Gemfile.lock 2 个添加, 2 个删除Gemfile.lock
- app/models/snippet.rb 2 个添加, 8 个删除app/models/snippet.rb
- app/services/snippets/base_service.rb 9 个添加, 0 个删除app/services/snippets/base_service.rb
- app/services/snippets/create_service.rb 2 个添加, 1 个删除app/services/snippets/create_service.rb
- app/services/snippets/update_service.rb 4 个添加, 1 个删除app/services/snippets/update_service.rb
- app/services/spam/spam_action_service.rb 6 个添加, 3 个删除app/services/spam/spam_action_service.rb
- app/services/spam/spam_verdict_service.rb 5 个添加, 3 个删除app/services/spam/spam_verdict_service.rb
- lib/gitlab/spamcheck/client.rb 33 个添加, 16 个删除lib/gitlab/spamcheck/client.rb
- spec/lib/gitlab/spamcheck/client_spec.rb 52 个添加, 7 个删除spec/lib/gitlab/spamcheck/client_spec.rb
- spec/requests/api/project_snippets_spec.rb 3 个添加, 0 个删除spec/requests/api/project_snippets_spec.rb
- spec/requests/api/snippets_spec.rb 2 个添加, 0 个删除spec/requests/api/snippets_spec.rb
- spec/services/spam/spam_action_service_spec.rb 53 个添加, 25 个删除spec/services/spam/spam_action_service_spec.rb
- spec/services/spam/spam_verdict_service_spec.rb 51 个添加, 7 个删除spec/services/spam/spam_verdict_service_spec.rb
- spec/support/shared_examples/services/snippets_shared_examples.rb 2 个添加, 1 个删除...port/shared_examples/services/snippets_shared_examples.rb
加载中
想要评论请 注册 或 登录