-
由 Lin Jen-Shin 创作于
The same idea is used in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/110018 We still use `Gitlab::RspecFlaky::Report.load(flaky_report_path).flaky_examples.to_h` because it does the following, which is more than just `JSON.parse`: * `JSON.parse` * Check if the parsed JSON is a `Hash`: `collection.is_a?(Hash)` and the values can also be converted to be a hash `example.to_h` * `Time.parse(attributes[attr]) if attributes[attr].is_a?(String)` where `attr` is `first_flaky_at` and `last_flaky_at`, and `attributes` is `example.to_h`
由 Lin Jen-Shin 创作于The same idea is used in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/110018 We still use `Gitlab::RspecFlaky::Report.load(flaky_report_path).flaky_examples.to_h` because it does the following, which is more than just `JSON.parse`: * `JSON.parse` * Check if the parsed JSON is a `Hash`: `collection.is_a?(Hash)` and the values can also be converted to be a hash `example.to_h` * `Time.parse(attributes[attr]) if attributes[attr].is_a?(String)` where `attr` is `first_flaky_at` and `last_flaky_at`, and `attributes` is `example.to_h`
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。