File tree Expand file tree Collapse file tree 2 files changed +0
-22
lines changed
lib/dependabot/pre_commit
spec/dependabot/pre_commit Expand file tree Collapse file tree 2 files changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,6 @@ def self.required_files_in?(filenames)
2525
2626 sig { override . returns ( T ::Array [ DependencyFile ] ) }
2727 def fetch_files
28- unless allow_beta_ecosystems?
29- raise Dependabot ::DependencyFileNotFound . new (
30- nil ,
31- "PreCommit support is currently in beta. Set ALLOW_BETA_ECOSYSTEMS=true to enable it."
32- )
33- end
34-
3528 fetched_files = [ ]
3629 fetched_files << pre_commit_config
3730
Original file line number Diff line number Diff line change 3333
3434 before do
3535 allow ( file_fetcher_instance ) . to receive ( :commit ) . and_return ( "sha" )
36- Dependabot ::Experiments . register ( :enable_beta_ecosystems , true )
3736 end
3837
3938 it_behaves_like "a dependency file fetcher"
120119 expect ( content ) . to include ( "v4.4.0" )
121120 end
122121
123- context "when beta ecosystems are disabled" do
124- before do
125- Dependabot ::Experiments . register ( :enable_beta_ecosystems , false )
126- end
127-
128- it "raises a DependencyFileNotFound error" do
129- expect { file_fetcher_instance . files }
130- . to raise_error ( Dependabot ::DependencyFileNotFound ) do |error |
131- expect ( error . message ) . to include ( "beta" )
132- end
133- end
134- end
135-
136122 context "when the config file is missing" do
137123 before do
138124 stub_request ( :get , url + ".pre-commit-config.yaml?ref=sha" )
149135 context "when exclude_paths is configured" do
150136 before do
151137 allow ( Dependabot ::Experiments ) . to receive ( :enabled? ) . and_return ( false )
152- allow ( Dependabot ::Experiments ) . to receive ( :enabled? ) . with ( :enable_beta_ecosystems ) . and_return ( true )
153138 allow ( Dependabot ::Experiments ) . to receive ( :enabled? )
154139 . with ( :enable_exclude_paths_subdirectory_manifest_files ) . and_return ( true )
155140 file_fetcher_instance . exclude_paths = [ ".pre-commit-config.yaml" ]
You can’t perform that action at this time.
0 commit comments