Skip to content

Commit e7fc150

Browse files
authored
Merge branch 'main' into npm_and_yarn/engines_field_for_package_manager_with_caret_and_major_version
2 parents 9bd4e39 + f9775c6 commit e7fc150

21 files changed

Lines changed: 1174 additions & 281 deletions

File tree

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@ started.
5252

5353
>**Note:** If you're looking to run Dependabot locally for development/debugging purposes, see the [Development Guide](#development-guide).
5454
55-
## Dependabot-Script
55+
## Dependabot CLI
5656

57-
The [dependabot-script](https://github.com/dependabot/dependabot-script) repo provides a collection of example scripts for configuring the Dependabot-Core library.
58-
It is intended as a starting point for advanced users to run a self-hosted version of Dependabot within their own projects.
57+
The open-source [Dependabot CLI](https://github.com/dependabot/cli) is our recommended entrypoint for standalone use cases.
5958

60-
>**Note:** We recently refactored the monolithic docker image used within the Dependabot Core library into one-image-per-ecosystem. Unfortunately, that broke dependabot-scripts, and we haven't had time to update them yet. We are aware of the problem and hope to provide a solution soon.
59+
We use it in production here at GitHub, and advanced users can also leverage it to run a self-hosted version of Dependabot within their own projects / CI systems.
6160

62-
## Dependabot CLI
61+
It creates dependency diffs but does not create PRs. So you will need to wire that up yourself.
62+
To aid with that, we created the [example-cli-usage](https://github.com/dependabot/example-cli-usage) repo which demonstrates how to turn those diffs into actual PR's.
63+
64+
## Write your own Ruby-based tool
6365

64-
The [Dependabot CLI](https://github.com/dependabot/cli) is a newer tool that may eventually replace [`dependabot-script`](#dependabot-script) for standalone use cases.
65-
While it creates dependency diffs, it's currently missing the logic to turn those diffs into actual PRs. Nevertheless, it
66-
may be useful for advanced users looking for examples of how to hack on Dependabot.
66+
Alternatively, because Dependabot-Core is a Ruby library, you can write your own ruby-based wrapper that leverages the Dependabot-core code. The tricky bit is Dependabot assumes it's running in an isolated, throw-away environment so you'll need to handle all that yourself. For example protecting against security risks of arbitrary code execution exfiltrating credentials, ensuring the appropriate version of Go or Python or whatever language you need is available, and handling when Dependabot makes changes to its runtime environment.
6767

6868
## Dependabot on CI
6969

composer/Dockerfile

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ FROM ghcr.io/dependabot/dependabot-updater-core
33
ARG COMPOSER_V2_VERSION=2.8.10
44
ARG PHP_VERSION=8.4
55
ENV COMPOSER_ALLOW_SUPERUSER=1
6-
RUN apt-get update \
7-
&& apt-get upgrade -y \
8-
&& apt-get install -y --no-install-recommends \
9-
software-properties-common
10-
RUN add-apt-repository ppa:ondrej/php \
11-
&& apt-get update \
12-
&& apt-get install -y --no-install-recommends \
6+
RUN <<EOF
7+
apt-get update
8+
apt-get upgrade -y
9+
apt-get install -y --no-install-recommends software-properties-common
10+
11+
# Install PHP and its packages
12+
add-apt-repository ppa:ondrej/php
13+
apt-get update
14+
apt-get install -y --no-install-recommends \
1315
php${PHP_VERSION} \
1416
php${PHP_VERSION}-apcu \
1517
php${PHP_VERSION}-bcmath \
@@ -34,10 +36,12 @@ RUN add-apt-repository ppa:ondrej/php \
3436
php${PHP_VERSION}-xml \
3537
php${PHP_VERSION}-zip \
3638
php${PHP_VERSION}-zmq \
37-
php${PHP_VERSION}-mcrypt \
38-
&& rm -rf /var/lib/apt/lists/*
39+
php${PHP_VERSION}-mcrypt
40+
rm -rf /var/lib/apt/lists/*
3941

40-
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_V2_VERSION}
42+
# Install Composer
43+
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --version=${COMPOSER_V2_VERSION}
44+
EOF
4145

4246
USER dependabot
4347
# Perform a fake `composer update` to warm ~/dependabot/.cache/composer/repo

conda/lib/dependabot/conda/file_fetcher.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ def self.required_files_message
3131

3232
sig { override.returns(T::Array[DependencyFile]) }
3333
def fetch_files
34-
unless allow_beta_ecosystems?
35-
raise Dependabot::DependencyFileNotFound.new(
36-
nil,
37-
"Conda support is currently in beta. Set ALLOW_BETA_ECOSYSTEMS=true to enable it."
38-
)
39-
end
40-
4134
fetched_files = []
4235

4336
# Try to fetch environment.yml first, then environment.yaml

0 commit comments

Comments
 (0)