forked from dependabot/dependabot-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into jamiemagee/sentry-ruby
- Loading branch information
Showing
39 changed files
with
365 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BUNDLE_GEMFILE: "../dependabot-updater/Gemfile" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/.bundle/ | ||
!.bundle/config | ||
/.env | ||
/tmp | ||
/dependabot-*.gem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
inherit_from: ../.rubocop.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM ghcr.io/dependabot/dependabot-updater-core | ||
ARG TARGETARCH | ||
|
||
# OS dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
make \ | ||
ca-certificates \ | ||
gnupg \ | ||
build-essential \ | ||
curl \ | ||
&& mkdir -p /etc/apt/keyrings \ | ||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ | ||
&& NODE_MAJOR=18 \ | ||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y nodejs \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN npm install -g @devcontainers/cli | ||
|
||
USER dependabot | ||
|
||
# Needed because tools like dependabot/cli will proxy/MITM the traffic | ||
# to the registry with a cert that (without this change) is not known | ||
# to the dev container process. See: | ||
# * https://github.com/microsoft/vscode-remote-release/issues/6092 | ||
# * https://github.com/devcontainers/cli/blob/2d24543380dfc4d54e76b582536b52226af133c8/src/spec-utils/httpRequest.ts#L130-L162 | ||
# * https://github.com/devcontainers/cli/pull/559 | ||
ENV NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt | ||
|
||
# Sanity check | ||
RUN devcontainer --version | ||
|
||
COPY --chown=dependabot:dependabot devcontainers $DEPENDABOT_HOME/devcontainers | ||
COPY --chown=dependabot:dependabot common $DEPENDABOT_HOME/common | ||
COPY --chown=dependabot:dependabot updater $DEPENDABOT_HOME/dependabot-updater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## `dependabot-devcontainers` | ||
|
||
Dev Containers support for [`dependabot-core`][core-repo]. | ||
|
||
### Running locally | ||
|
||
1. Start a development shell | ||
|
||
``` | ||
$ bin/docker-dev-shell devcontainers | ||
``` | ||
|
||
2. Run tests | ||
``` | ||
[dependabot-core-dev] ~ $ cd devcontainers && rspec | ||
``` | ||
|
||
[core-repo]: https://github.com/dependabot/dependabot-core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
Gem::Specification.new do |spec| | ||
common_gemspec = | ||
Bundler.load_gemspec_uncached("../common/dependabot-common.gemspec") | ||
|
||
spec.name = "dependabot-devcontainers" | ||
spec.summary = "Provides Dependabot support for Dev Containers" | ||
spec.description = "Dependabot-Devcontainers provides support for managing dev container versioning via Dependabot." | ||
|
||
spec.author = common_gemspec.author | ||
spec.email = common_gemspec.email | ||
spec.homepage = common_gemspec.homepage | ||
spec.license = common_gemspec.license | ||
|
||
spec.metadata = { | ||
"bug_tracker_uri" => common_gemspec.metadata["bug_tracker_uri"], | ||
"changelog_uri" => common_gemspec.metadata["changelog_uri"] | ||
} | ||
|
||
spec.version = common_gemspec.version | ||
spec.required_ruby_version = common_gemspec.required_ruby_version | ||
spec.required_rubygems_version = common_gemspec.required_ruby_version | ||
|
||
spec.require_path = "lib" | ||
spec.files = Dir["lib/**/*"] | ||
|
||
spec.add_dependency "dependabot-common", Dependabot::VERSION | ||
|
||
common_gemspec.development_dependencies.each do |dep| | ||
spec.add_development_dependency dep.name, *dep.requirement.as_list | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# typed: strong | ||
# 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/devcontainers/file_fetcher" | ||
require "dependabot/devcontainers/file_parser" | ||
require "dependabot/devcontainers/update_checker" | ||
require "dependabot/devcontainers/file_updater" | ||
require "dependabot/devcontainers/metadata_finder" | ||
require "dependabot/devcontainers/requirement" | ||
require "dependabot/devcontainers/version" | ||
|
||
require "dependabot/pull_request_creator/labeler" | ||
Dependabot::PullRequestCreator::Labeler | ||
.register_label_details("devcontainers", name: "devcontainers_package_manager", colour: "2753E3") | ||
|
||
require "dependabot/dependency" | ||
Dependabot::Dependency | ||
.register_production_check("devcontainers", ->(_) { true }) | ||
|
||
require "dependabot/utils" | ||
Dependabot::Utils.register_always_clone("devcontainers") |
14 changes: 14 additions & 0 deletions
14
devcontainers/lib/dependabot/devcontainers/file_fetcher.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# typed: strong | ||
# frozen_string_literal: true | ||
|
||
require "dependabot/file_fetchers" | ||
require "dependabot/file_fetchers/base" | ||
|
||
module Dependabot | ||
module Devcontainers | ||
class FileFetcher < Dependabot::FileFetchers::Base | ||
end | ||
end | ||
end | ||
|
||
Dependabot::FileFetchers.register("devcontainers", Dependabot::Devcontainers::FileFetcher) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# typed: true | ||
# frozen_string_literal: true | ||
|
||
require "dependabot/file_parsers" | ||
require "dependabot/file_parsers/base" | ||
|
||
module Dependabot | ||
module Devcontainers | ||
class FileParser < Dependabot::FileParsers::Base | ||
def parse | ||
[] | ||
end | ||
|
||
private | ||
|
||
def check_required_files; end | ||
end | ||
end | ||
end | ||
|
||
Dependabot::FileParsers.register("devcontainers", Dependabot::Devcontainers::FileParser) |
14 changes: 14 additions & 0 deletions
14
devcontainers/lib/dependabot/devcontainers/file_updater.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# typed: strong | ||
# frozen_string_literal: true | ||
|
||
require "dependabot/file_updaters" | ||
require "dependabot/file_updaters/base" | ||
|
||
module Dependabot | ||
module Devcontainers | ||
class FileUpdater < Dependabot::FileUpdaters::Base | ||
end | ||
end | ||
end | ||
|
||
Dependabot::FileUpdaters.register("devcontainers", Dependabot::Devcontainers::FileUpdater) |
Oops, something went wrong.