Remove use of Vulnerability.states[:somesymbol] from service classes
We can just use the enum states directly as symbols rather than calling `.states` on the class This was brought up in a comment on another MR ([here][0]): > I noticed a lot of indexing and explicit references to the > Vulnerability State enum which Rails will conveniently magic away for > us anyways. I've added in suggestions to let Rails handle that > behaviour more for us This commit removes those aforementioned explicit usages of the enum [0]:https://gitlab.com/gitlab-org/gitlab/-/merge_requests/99142#note_1118961906
显示
- ee/app/services/security/ingestion/tasks/ingest_vulnerabilities/mark_resolved_as_detected.rb 3 个添加, 3 个删除...tasks/ingest_vulnerabilities/mark_resolved_as_detected.rb
- ee/lib/ee/gitlab/background_migration/migrate_vulnerabilities_feedback_to_vulnerabilities_state_transition.rb 0 个添加, 1 个删除...abilities_feedback_to_vulnerabilities_state_transition.rb
- ee/spec/factories/vulnerabilities.rb 4 个添加, 4 个删除ee/spec/factories/vulnerabilities.rb
- ee/spec/factories/vulnerabilities/read.rb 1 个添加, 1 个删除ee/spec/factories/vulnerabilities/read.rb
加载中
想要评论请 注册 或 登录