Skip to content
代码片段 群组 项目
未验证 提交 d2844755 编辑于 作者: Michael Becker's avatar Michael Becker
浏览文件

Remove unused `MAX_DAYS_OF_HISTORY` from vulnerabilities

The [`MAX_DAYS_OF_HISTORY`][0] constant in the `vulnerability` model
appears to be unused:

```sh
~/gitlab-development-kit/gitlab$ ag --ignore TAGS \
                                 --literal \
                                 --group \
                                 --line-number \
                                 --column \
                                 --smart-case -- MAX_DAYS_OF_HISTORY .
File: ee/app/models/ee/vulnerability.rb
22:7:      MAX_DAYS_OF_HISTORY = 10
1 matches
1 files contained matches
62376 files searched
```

git history
---------------------

1. added in [7ff151eb][1]
    * used in `VulnerabilitiesHistoryResolver` and `Vulnerability.counts_by_day_and_severity`
2. `VulnerabilitiesHistoryResolver` removed in [89009fc7][2]
3. `Vulnerability.counts_by_day_and_severity` removed in [e9567195][3]

resolves: https://gitlab.com/gitlab-org/gitlab/-/issues/433494

[0]:https://gitlab.com/gitlab-org/gitlab/-/blob/680c3e59747085155c4662c708d521d97ed77ea0/ee/app/models/ee/vulnerability.rb#L22
[1]:https://gitlab.com/gitlab-org/gitlab/-/blob/680c3e59747085155c4662c708d521d97ed77ea0/ee/app/models/ee/vulnerability.rb#L22
[2]:https://gitlab.com/gitlab-org/gitlab/-/commit/89009fc7e7c4830dbebec7ccd911fb4fcee17722
[3]:https://gitlab.com/gitlab-org/gitlab/-/commit/e95671953d747eed9bda479bd3c1b49d6a3149ae
上级 4f11d053
No related branches found
No related tags found
无相关合并请求
......@@ -19,7 +19,6 @@ module Vulnerability
include ::VulnerabilityScopes
include DatabaseEventTracking
MAX_DAYS_OF_HISTORY = 10
ACTIVE_STATES = %w[detected confirmed].freeze
PASSIVE_STATES = %w[dismissed resolved].freeze
SUMMARY_DELIMITER = '|'
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册