Class: Dependabot::Docker::FileUpdater
Constant Summary
collapse
- YAML_REGEXP =
/^[^\.].*\.ya?ml$/i
- FROM_REGEX =
/FROM(\s+--platform\=\S+)?/i
Shared::SharedFileUpdater::ImageSource
Instance Method Summary
collapse
#updated_dependency_files
Instance Method Details
#container_image_regex ⇒ Object
29
30
31
|
# File 'lib/dependabot/docker/file_updater.rb', line 29
def container_image_regex
%r{^#{FROM_REGEX}\s+(docker\.io/)?}o
end
|
#file_type ⇒ Object
19
20
21
|
# File 'lib/dependabot/docker/file_updater.rb', line 19
def file_type
"Dockerfile or Containerfile"
end
|
#notices ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/dependabot/docker/file_updater.rb', line 34
def notices
return [] unless dependencies.any? { |dependency| dependency.metadata[:docker_cooldown_date_unavailable] }
[Dependabot::Notice.new(
mode: Dependabot::Notice::NoticeMode::WARN,
type: "docker_cooldown_date_unavailable",
package_manager_name: "docker",
title: "Docker cooldown was not applied",
description: "Cooldown could not be applied because no publication date was available from the registry.",
show_in_pr: true,
show_alert: false
)]
end
|
#yaml_file_pattern ⇒ Object
24
25
26
|
# File 'lib/dependabot/docker/file_updater.rb', line 24
def yaml_file_pattern
YAML_REGEXP
end
|