forked from dependabot/dependabot-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterraform.rb
33 lines (27 loc) · 1.11 KB
/
terraform.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# frozen_string_literal: true
# These all need to be required so the various classes can be registered in a
# lookup table of package manager names to concrete classes.
require "dependabot/terraform/file_fetcher"
require "dependabot/terraform/file_parser"
require "dependabot/terraform/update_checker"
require "dependabot/terraform/file_updater"
require "dependabot/terraform/metadata_finder"
require "dependabot/terraform/requirement"
require "dependabot/terraform/version"
require "dependabot/pull_request_creator/labeler"
Dependabot::PullRequestCreator::Labeler.
register_label_details("terraform", name: "terraform", colour: "5C4EE5")
require "dependabot/dependency"
Dependabot::Dependency.
register_production_check("terraform", ->(_) { true })
require "dependabot/utils"
Dependabot::Utils.register_always_clone("terraform")
Dependabot::Dependency.
register_display_name_builder(
"terraform",
lambda { |name|
# Only modify the name if it a git source dependency
return name unless name.include? "::"
name.split("::").first + "::" + name.split("::")[2].split("/").last.split("(").first
}
)