Skip to content

Commit

Permalink
Latest changes from dependabot-core main (#439)
Browse files Browse the repository at this point in the history
* v0.162.0

* handle support files with dir macro in umbrellas

* bin/dry-run.rb exits outside a developer shell

* Update README

* Prefer checking user over touching a file

* Support basic Kotlin apply, add tests

* Escape paths passed to VendorUpdater

Paths in packages could be constructed to perform command, when not
properly escaped those could be executed.

```
(byebug) `file -b --mime-encoding t&&curl$IFS@0.0.0.0&&.go`
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (7) Failed to connect to 0.0.0.0 port 80: Connection refused
"cannot open `t' (No such file or directory)\n"
```

```
(byebug) `#{Dependabot::SharedHelpers.escape_command("file -b --mime-encoding t&&curl$IFS@0.0.0.0&&.go")}`
"cannot open `t&&curl$IFS@0.0.0.0&&.go' (No such file or directory)\n"
```

* Bump golang from 1.17 to 1.17.1

* build(deps): bump github.com/dependabot/gomodules-extracted

Bumps [github.com/dependabot/gomodules-extracted](https://github.com/dependabot/gomodules-extracted) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/dependabot/gomodules-extracted/releases)
- [Commits](dependabot/gomodules-extracted@v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: github.com/dependabot/gomodules-extracted
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix  `labels': Unsupported provider bitbucket

Bitbucket doesn't yet supports PR labels.
dependabot throught this issue whenever I try to use it with bitbucket 
labeler.rb:241:in `labels': Unsupported provider bitbucket (RuntimeError)

* Fix minor typos in changelog

* v0.162.1

* Support Gradle files with no top level build.gradle file

* Treat tokens after underscore as numeric if possible

* Simplify string processing

* Ignore replaced dependencies

* v0.162.2

* Add support for gradlePluginPortal()

* build(deps-dev): bump jest in /npm_and_yarn/helpers

Bumps [jest](https://github.com/facebook/jest) from 27.0.6 to 27.2.4.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](jestjs/jest@v27.0.6...v27.2.4)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Handle .tar path dependency

* Fix indentation

* build(deps): bump composer/composer in /composer/helpers/v1

Bumps [composer/composer](https://github.com/composer/composer) from 1.10.22 to 1.10.23.
- [Release notes](https://github.com/composer/composer/releases)
- [Changelog](https://github.com/composer/composer/blob/master/CHANGELOG.md)
- [Commits](composer/composer@1.10.22...1.10.23)

---
updated-dependencies:
- dependency-name: composer/composer
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump @npmcli/arborist in /npm_and_yarn/helpers

Bumps [@npmcli/arborist](https://github.com/npm/arborist) from 2.8.0 to 3.0.0.
- [Release notes](https://github.com/npm/arborist/releases)
- [Changelog](https://github.com/npm/arborist/blob/main/CHANGELOG.md)
- [Commits](npm/arborist@v2.8.0...v3.0.0)

---
updated-dependencies:
- dependency-name: "@npmcli/arborist"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump friendsofphp/php-cs-fixer in /composer/helpers/v2

Bumps [friendsofphp/php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) from 3.0.0 to 3.2.1.
- [Release notes](https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.2.1/CHANGELOG.md)
- [Commits](PHP-CS-Fixer/PHP-CS-Fixer@v3.0.0...v3.2.1)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add issue template config with Dependabot contact links

* Fix elm tests

The version resolver fetches the latest version from the public
registry, and since we shell out to `elm` for this, it's currently hard
to stub out.

Our test fixture did not have the latest version yet and would cause our
tests to fail.

Ideally we'd rely on both the version_checker and resolver using
the same source that we stub, but unfortunately with the way our tests
are set up makes that hard. Fortunately these don't change often, so I
suggest we live with the pain for now.

* Fix Poetry unreachable git deps error

Since python-poetry/poetry-core#202 poetry now
uses a slightly different (safer) git command, and this caused the
regex matching we do on the error output to now fail.

This fixes up the regex, and just to be safe ensures it'll keep working
with the old version as well.

The test that was failing was:
`python/spec/dependabot/python/update_checker/poetry_version_resolver_spec.rb:179`

* build(deps-dev): bump prettier in /npm_and_yarn/helpers

Bumps [prettier](https://github.com/prettier/prettier) from 2.3.2 to 2.4.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@2.3.2...2.4.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Gradle: Prefer method call over instance variable access in file fetcher

* build(deps): bump poetry from 1.1.7 to 1.1.11 in /python/helpers

Bumps [poetry](https://github.com/python-poetry/poetry) from 1.1.7 to 1.1.11.
- [Release notes](https://github.com/python-poetry/poetry/releases)
- [Changelog](https://github.com/python-poetry/poetry/blob/1.1.11/CHANGELOG.md)
- [Commits](python-poetry/poetry@1.1.7...1.1.11)

---
updated-dependencies:
- dependency-name: poetry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump composer/composer in /composer/helpers/v2

Bumps [composer/composer](https://github.com/composer/composer) from 2.1.3 to 2.1.9.
- [Release notes](https://github.com/composer/composer/releases)
- [Changelog](https://github.com/composer/composer/blob/master/CHANGELOG.md)
- [Commits](composer/composer@2.1.3...2.1.9)

---
updated-dependencies:
- dependency-name: composer/composer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump pip-tools from 6.2.0 to 6.3.0 in /python/helpers

Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](jazzband/pip-tools@6.2.0...6.3.0)

---
updated-dependencies:
- dependency-name: pip-tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump wheel from 0.36.2 to 0.37.0 in /python/helpers

Bumps [wheel](https://github.com/pypa/wheel) from 0.36.2 to 0.37.0.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/master/docs/news.rst)
- [Commits](pypa/wheel@0.36.2...0.37.0)

---
updated-dependencies:
- dependency-name: wheel
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump phpstan/phpstan in /composer/helpers/v1

Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.93 to 0.12.99.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Commits](phpstan/phpstan@0.12.93...0.12.99)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump friendsofphp/php-cs-fixer in /composer/helpers/v1

Bumps [friendsofphp/php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) from 2.19.0 to 2.19.2.
- [Release notes](https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/3.0/CHANGELOG.md)
- [Commits](PHP-CS-Fixer/PHP-CS-Fixer@v2.19.0...v2.19.2)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* v0.163.0

* remove trailing whitespaces

* Recommend `git reset` when cloning repository on Windows fails

`git restore --source=HEAD :/` which is currently suggested by Git does not work,
it is unable to restore the files, see git-for-windows/git#3411.

* build(deps): bump pip-tools from 6.3.0 to 6.3.1 in /python/helpers

Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](jazzband/pip-tools@6.3.0...6.3.1)

---
updated-dependencies:
- dependency-name: pip-tools
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump jest in /npm_and_yarn/helpers

Bumps [jest](https://github.com/facebook/jest) from 27.2.4 to 27.2.5.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](jestjs/jest@v27.2.4...v27.2.5)

---
updated-dependencies:
- dependency-name: jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump pip from 21.1.3 to 21.2.4 in /python/helpers

Bumps [pip](https://github.com/pypa/pip) from 21.1.3 to 21.2.4.
- [Release notes](https://github.com/pypa/pip/releases)
- [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst)
- [Commits](pypa/pip@21.1.3...21.2.4)

---
updated-dependencies:
- dependency-name: pip
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump flake8 from 3.9.2 to 4.0.0 in /python/helpers

Bumps [flake8](https://github.com/pycqa/flake8) from 3.9.2 to 4.0.0.
- [Release notes](https://github.com/pycqa/flake8/releases)
- [Commits](PyCQA/flake8@3.9.2...4.0.0)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump eslint in /npm_and_yarn/helpers

Bumps [eslint](https://github.com/eslint/eslint) from 7.32.0 to 8.0.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v7.32.0...v8.0.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump golang.org/x/mod in /go_modules/helpers

Bumps [golang.org/x/mod](https://github.com/golang/mod) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/golang/mod/releases)
- [Commits](golang/mod@v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: golang.org/x/mod
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Upgrade OTP to latest minor: 23.3.4.5

* Python: Upgrade pyenv to 2.1.0

This also adds Python 3.10.0, 3.7.12, 3.6.15

* Bump Terraform from 1.0.6 to 1.0.8

https://github.com/hashicorp/terraform/blob/v1.0/CHANGELOG.md#108-september-29-2021

* build(deps): bump pip-tools from 6.3.1 to 6.4.0 in /python/helpers

Bumps [pip-tools](https://github.com/jazzband/pip-tools) from 6.3.1 to 6.4.0.
- [Release notes](https://github.com/jazzband/pip-tools/releases)
- [Changelog](https://github.com/jazzband/pip-tools/blob/master/CHANGELOG.md)
- [Commits](jazzband/pip-tools@6.3.1...6.4.0)

---
updated-dependencies:
- dependency-name: pip-tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump flake8 from 4.0.0 to 4.0.1 in /python/helpers

Bumps [flake8](https://github.com/pycqa/flake8) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/pycqa/flake8/releases)
- [Commits](PyCQA/flake8@4.0.0...4.0.1)

---
updated-dependencies:
- dependency-name: flake8
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* update Elixir from 1.12.2 -> 1.12.3

* update erlang solutions from 1.0 to 2.0

* v0.163.1

* Add license to image and gemspec

The dependabot-* gems on rubygems currently have the license set as 'nonstandard' and do not include a license file.

* Add license to gem build directory

* Set license back to Nonstandard

Rubygems only recognizes licenses on the spdx license list, and the Prosperity Public License 2.0.0 is not one of them.

* Allow passing target_project_id to Gitlab pr creator and updater

* Revert "Add license to gem build directory"

This reverts commit 05aa6ee.

* Update specs

Validate target_project_id passed correctly

Fix request expectation

* Move target_project_id to provider_metadata

* Treat GHES hosted sources as github sources

When a dependency is hosted on GHES, previously it was not treated as a
GitHub source, meaning that we would not check for releases/changelogs
etc when requesting Metadata for the PR.

This fixes that, by first parsing the URL, and then making a request to
`<host>/status`, and checking for a `X-GitHub-Request-Id` header, which
we return from GitHub Enterprise Server.

* Revert "v0.163.1"

This reverts commit 2103fbb.

* v0.164.0

* Add TagsCreationForbidden Exception to Azure Client

* Make labeler optional in Azure

* Add labels_required param to PR creator

* Fix indentation

* Ensure we cleanup tmp directories after use

* Only check auth for github.com

* v0.164.1

* feat: specify timeouts per spawned process

* style: fix linter errors

* test: update glass assertions

* test: ensure the proper command is generated

* feat: trap SIGHUB and flush error to stdout

* refactor: collapse multi line conditional

* style: fix linter errors

* refactor: extract class to build shell command

* style: fix linter errors

* fix: ensure min of 1 minute and max of 30 minutes per op

* refactor: make timeout_seconds a private method

* [Gradle] add settings_file to fetched_files

* [Gradle] add settings files to SUPPORTED_BUILD_FILE_NAMES

* [Gradle] update tests

* refactor: use Comparable#clamp

* [Gradle] add tests for FileParser

* [Gradle] fix implementation

* v0.165.0

* Bump to go 1.17.3

There were some minor fixes to the `go` command in 1.17.2/1.17.3... 

I don't think any of them directly affect dependabot, but it
doesn't hurt to bump this and makes it so the next person has a smaller
diff to look at when they consider updating.

* Move composer-not-found fixture from decommissioned dependabot.com

* Ignore errors from Source enterprise check and ignore known failures

We check if a potential Source is GitHub enterprise by making a request
to a `/status` endpoint against the root URL and checking some headers.

We've observed this check failing in some cases when the source is not
enterprise, and we get rate limited, or otherwise the request fails with
an error.

In this case we do not want to block creating a PR, but instead we
should assume the source is not Enterprise.

This also adds a list of known hosts that we come across often that
definitely are not GitHub Enterprise instances, and we ignore those and
don't bother making a request to them.

Co-Authored-By: Barry Gordon <brrygrdn@github.com>

* Explicitly ignore metadata detection for fuchsia.googlesource.com

We've observed some failures when trying to establish if this might be
an GHES host, since we can be confident it's not, let's not bother
making a request to check.

* v0.166.0

* Apply suggested code tweaks

* Fix variable references

* Refactor code to reduce complexity

This also reverts a previous incorrect change.
With this, rubocop is happy and the tests still pass.

* Improve error handling when `terraform init` fails

We attempt to run `terraform init` once, but when this fails, we still
end up with an unhandled error. Given that there is not much we can do
at this point, communicate that to the user instead, and treat it as a
resolvability error.

At the same time, when `terraform init` fails with an error other than
a private source error, there is no point trying further so we should
raise a resolvability error as well.

* Rescue terraform registry connection errors

* v0.166.1

* Remove labels_required param

* Run YarnUpdate only once for a version requirement

* Fix indent

* Adjust indentation to please rubocop

* fix: remove fixed error message check

A new version of [pandoc-ruby](https://rubygems.org/gems/pandoc-ruby/versions/2.1.5) was recently released
that changes the behaviour of how the `pandoc` executable is invoked.
[src](xwmx/pandoc-ruby@2.1.4...2.1.5).

/cc dependabot#2849

* style: fix linter errors

* Fix

* build(deps-dev): bump friendsofphp/php-cs-fixer in /composer/helpers/v2

Bumps [friendsofphp/php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) from 3.2.1 to 3.3.2.
- [Release notes](https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.3.2/CHANGELOG.md)
- [Commits](PHP-CS-Fixer/PHP-CS-Fixer@v3.2.1...v3.3.2)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump friendsofphp/php-cs-fixer in /composer/helpers/v1

Bumps [friendsofphp/php-cs-fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) from 2.19.2 to 2.19.3.
- [Release notes](https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](PHP-CS-Fixer/PHP-CS-Fixer@v2.19.2...v2.19.3)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump pipenv from 2021.5.29 to 2021.11.15 in /python/helpers

Bumps [pipenv](https://github.com/pypa/pipenv) from 2021.5.29 to 2021.11.15.
- [Release notes](https://github.com/pypa/pipenv/releases)
- [Changelog](https://github.com/pypa/pipenv/blob/main/CHANGELOG.rst)
- [Commits](pypa/pipenv@v2021.5.29...v2021.11.15)

---
updated-dependencies:
- dependency-name: pipenv
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Maven: Correctly handle nested declarations

We've observed errors around pom files that have a nested `plugin`
section inside an outer plugin declaration.

Previously we used a regex to recursively scan the XML document, which
caused the inner `plugin` declarations closing tag to match the regex,
resulting in an incomplete XML section.

To demonstrate, given the following XML:

```xml
<plugins>
  <plugin>
    <configuration>
      <jvmTarget>11</jvmTarget>
      <compilerPlugins>
        <plugin>spring</plugin>
      </compilerPlugins>
    </configuration>
    <groupId>org.jetbrains.kotlin</groupId>
    <artifactId>kotlin-maven-plugin</artifactId>
    <version>${kotlin.version}</version>
  </plugin>
</plugin>
```

The `<plugin>spring</plugin>` declaration would cause a regex match,
resulting in the required information (the `version` in this case) to be
omitted from the XML snippet.

This is resolved by using Nokogiri to traverse the XML instead of using
regular expressions, and selecting the nodes by name.

Co-authored-by: Landon Grindheim <landongrindheim@github.com>

* v0.167.0

* Remove the dependabot migration issue template

The Dependabot Preview service was shut down on the 3rd of August 2021,
so our path to migration is now closed and the service has been wrapped
up.

This template format is no longer required, any issues for lapsed users
returning to the integrated Dependabot service should just file a standard
bug report.

* Do not freeze file-based Poetry dependency version

Fixes dependabot#4333

* Polish

* Code formatting

* Remove unnecessary quotes

Co-authored-by: Jurre <jurre@github.com>

* Fix typo

* Special case URL dependencies, add better positive assertions for file and directory dependencies

* Rename expected files in tests

* Rename file back

* build(deps): bump @npmcli/arborist in /npm_and_yarn/helpers

Bumps [@npmcli/arborist](https://github.com/npm/arborist) from 3.0.0 to 4.0.5.
- [Release notes](https://github.com/npm/arborist/releases)
- [Changelog](https://github.com/npm/arborist/blob/main/CHANGELOG.md)
- [Commits](npm/arborist@v3.0.0...v4.0.5)

---
updated-dependencies:
- dependency-name: "@npmcli/arborist"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump phpstan/phpstan in /composer/helpers/v1

Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.99 to 1.2.0.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/master/CHANGELOG.md)
- [Commits](phpstan/phpstan@0.12.99...1.2.0)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps-dev): bump phpstan/phpstan in /composer/helpers/v2

Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.93 to 1.2.0.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/master/CHANGELOG.md)
- [Commits](phpstan/phpstan@0.12.93...1.2.0)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update some pipenv error handling to match latest version

* Add support for custom commit message trailer

* Pass custom git trailers as hash object

* Remove reliance on `PandocRuby`

PandocRuby has been used to convert RestructuredText (rst), a
markdown-like format widely used in the Python ecosystem, to markdown.
We recently noticed new errors surfacing around Pandoc and started to
investigate.  This led to the discovery that Pandoc was not installed in
the Docker container GitHub is using to run Dependabot against
repositories.

I'm opting to remove this dependency as PandocRuby is effectively
unused.

Note: There is the possibility that some users rely on this
functionality. As has been noted in a recent PR-review, non-Docker usage
of dependabot-core is poorly supported, so this seems unlikely.

* Update tests to reflect our not converting rst's

We stopped relying on `PandocRuby` in a previous commit. This test may
be able to go away, but first I'd like to prove that it's no longer
needed.

* Allow providing env to SharedHelpers.run_shell_command

* Switch to go command to find available module versions

* Handle new error message for bad module paths

go list returns a different error message:
go list -m: malformed module path "pkg-errors": missing dot in first path element

* Enable retracted module test

go list -m properly handles retractions so this test is now passing

* Bump latest go-modules-lib to v3. v2 was invalid.

Prior error:
go list -m: loading module retractions for github.com/dependabot-fixtures/go-modules-lib/v2@v2.0.0: version "v2.0.0" invalid: go.mod has non-.../v2 module path "github.com/dependabot-fixtures/go-modules-lib" (and .../v2/go.mod does not exist) at revision v2.0.0

* Handle invalid major version errors

* Remove unused go_modules updatechecker native helper

* Fix linter error

Co-authored-by: Jurre <jurre@github.com>

* Verify for just message code instead of text

* Fix linter issue

Co-authored-by: Jurre <jurre@github.com>

* build(deps-dev): bump eslint in /npm_and_yarn/helpers

Bumps [eslint](https://github.com/eslint/eslint) from 8.0.0 to 8.3.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.0.0...v8.3.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* build(deps): bump pip from 21.2.4 to 21.3.1 in /python/helpers

Bumps [pip](https://github.com/pypa/pip) from 21.2.4 to 21.3.1.
- [Release notes](https://github.com/pypa/pip/releases)
- [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst)
- [Commits](pypa/pip@21.2.4...21.3.1)

---
updated-dependencies:
- dependency-name: pip
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove test around updating unneeded transitive dependency

The behavior around this has changed in pipenv, but it does not seem
documented or even expected.

Essentially, this test was doing the following:

- add the transitive dependency to the Pipfile
- run `pipenv lock`
- check the version of the transitive dependency in the lockfile

Previous versions of pipenv would then remove the transitive dependency
from the lockfile, but it is not clear to me why, as it is present in
the Pipfile at that point. My guess is it would keep the top-level
dependencies cached somehow, but I've not been able to find much.

Either way, if transitive dependencies are _actually_ removed (meaning,
not also present in the manifest file), this should still work just
fine. The test setup is at the least confusing and at the worst wrong,
let's remove it.

* Clarify how env vars are passed to shell commands

Co-Authored-By: Mattt Zmuda <mattt@github.com>
Co-Authored-By: Landon Grindheim <landongrindheim@github.com>

* Python: Honour `--strip-extras` flag of `pip-compile`

The `--strip-extras` flag of `pip-compile` is useful to generate
contstraints files (instead of the more traditional requirements files)
from some `constraints.in` file.

Constraints files can't have extras markers on the packages (this
wouldn't make much sense indeed), hence they need to be stripped. Since
`pip-tools` 6.2.0 this is supported by using the `--strip-extras` flag.

This commit adds this as a 'recognized' flag: if it's found in an
existing `foo.txt` file, it will be passed to `pip-compile` when some
`foo.in` file is updated.

See: dependabot#3974 (comment)
See: dependabot#3974 (comment)
See: jazzband/pip-tools#1300 (comment)

* Use redirect.github.com for redirect service

* v0.168.0

* python: Update `GIT_DEPENDENCY_UNREACHABLE_REGEX` for pip 21.3.1

* v0.169.0

* Bump minimum to 1.17

This isn't strictly necessary, but since the rest of the infra bumped to 1.17,
might as well bump it here too. Esp since the `go.mod` behavior changed
a bit in `1.17`... so if more libs get added ever, this makes it so `go.mod`/`go.sum`
will follow the new behavior...

* build(deps): bump pipenv in /python/helpers

Bumps [pipenv](https://github.com/pypa/pipenv) from 2021.11.15 to 2021.11.23.
- [Release notes](https://github.com/pypa/pipenv/releases)
- [Changelog](https://github.com/pypa/pipenv/blob/main/CHANGELOG.rst)
- [Commits](pypa/pipenv@v2021.11.15...v2021.11.23)

---
updated-dependencies:
- dependency-name: pipenv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Dependabot config: ignore npm lib major version updates

These helpers exist to support npm 6, so we require that specific major version and should not update it.

* Update dependabot.yml

Co-authored-by: mo khan <mo@mokhan.ca>
Co-authored-by: Jurre <jurre@github.com>
Co-authored-by: Nish Sinha <nishnha@github.com>
Co-authored-by: nirev <nirev@taming-chaos.com>
Co-authored-by: Barry Gordon <brrygrdn@github.com>
Co-authored-by: Barry Gordon <896971+brrygrdn@users.noreply.github.com>
Co-authored-by: Zbynek Konecny <zbynek@geogebra.org>
Co-authored-by: Jurre Stender <jurrestender@gmail.com>
Co-authored-by: David McIntosh <804610+mctofu@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Melad Raouf <melad.raouf@gmail.com>
Co-authored-by: Zbynek Konecny <zbynek1729@gmail.com>
Co-authored-by: Jeroen Bobbeldijk <jeroen@klippa.com>
Co-authored-by: AlekhyaYalla <alekhyayalla@microsoft.com>
Co-authored-by: Andrew Bredow <andrewbredow@github.com>
Co-authored-by: Marcono1234 <Marcono1234@users.noreply.github.com>
Co-authored-by: Tomás Pinho <me@tomaspinho.com>
Co-authored-by: Parnassius <Parnassius@users.noreply.github.com>
Co-authored-by: Philip Ross <philipr@synopsys.com>
Co-authored-by: Andrejs Cunskis <andrejs.cunskis@gmail.com>
Co-authored-by: anatawa12 <anatawa12@icloud.com>
Co-authored-by: Jeff Widman <jeff@jeffwidman.com>
Co-authored-by: Tim Van Holder <tim.vanholder@gmail.com>
Co-authored-by: Landon Grindheim <landongrindheim@github.com>
Co-authored-by: Landon Grindheim <landon.grindheim@gmail.com>
Co-authored-by: Phillip Verheyden <pverheyden@gmail.com>
Co-authored-by: Mattt Zmuda <mattt@github.com>
Co-authored-by: Nicolas Trangez <ikke@nicolast.be>
Co-authored-by: Lane Seppala <lseppala@github.com>
Co-authored-by: Lane Seppala <lseppala@users.noreply.github.com>
Co-authored-by: Andy Freeland <andy@andyfreeland.net>
  • Loading branch information
1 parent 868e079 commit c28c944
Show file tree
Hide file tree
Showing 332 changed files with 6,611 additions and 14,805 deletions.
4 changes: 0 additions & 4 deletions .devcontainer/devcontainer.json
Expand Up @@ -30,10 +30,6 @@
"-v", "${localWorkspaceFolder}/composer/Gemfile:/home/dependabot/dependabot-core/composer/Gemfile",
"-v", "${localWorkspaceFolder}/composer/lib:/home/dependabot/dependabot-core/composer/lib",
"-v", "${localWorkspaceFolder}/composer/spec:/home/dependabot/dependabot-core/composer/spec",
"-v", "${localWorkspaceFolder}/dep/dependabot-dep.gemspec:/home/dependabot/dependabot-core/dep/dependabot-dep.gemspec",
"-v", "${localWorkspaceFolder}/dep/Gemfile:/home/dependabot/dependabot-core/dep/Gemfile",
"-v", "${localWorkspaceFolder}/dep/lib:/home/dependabot/dependabot-core/dep/lib",
"-v", "${localWorkspaceFolder}/dep/spec:/home/dependabot/dependabot-core/dep/spec",
"-v", "${localWorkspaceFolder}/docker/dependabot-docker.gemspec:/home/dependabot/dependabot-core/docker/dependabot-docker.gemspec",
"-v", "${localWorkspaceFolder}/docker/Gemfile:/home/dependabot/dependabot-core/docker/Gemfile",
"-v", "${localWorkspaceFolder}/docker/lib:/home/dependabot/dependabot-core/docker/lib",
Expand Down
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Questions or comments about Dependabot Alerts or Security Updates
url: https://support.github.com/
about: You're looking at the repository for Dependabot's updating logic. For issues about Dependabot the service, please contact GitHub Support.
43 changes: 0 additions & 43 deletions .github/ISSUE_TEMPLATE/migration-issue.md

This file was deleted.

3 changes: 3 additions & 0 deletions .github/dependabot.yml
Expand Up @@ -20,6 +20,9 @@ updates:
directory: "/npm_and_yarn/helpers"
schedule:
interval: "daily"
ignore:
- dependency-name: "npm"
update-types: ["version-update:semver-major"]
- package-ecosystem: "pip"
directory: "/python/helpers"
schedule:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -8,6 +8,8 @@ on:
pull_request:
branches:
- "**"
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
jobs:
Expand All @@ -23,7 +25,6 @@ jobs:
- { path: cargo, name: cargo }
- { path: common, name: common }
- { path: composer, name: composer }
- { path: dep, name: dep }
- { path: docker, name: docker }
- { path: elm, name: elm }
- { path: git_submodules, name: git_submodules }
Expand Down
209 changes: 202 additions & 7 deletions CHANGELOG.md

Large diffs are not rendered by default.

58 changes: 24 additions & 34 deletions Dockerfile
Expand Up @@ -76,7 +76,7 @@ RUN apt-add-repository ppa:brightbox/ruby-ng \
&& apt-get install -y --no-install-recommends ruby2.7 ruby2.7-dev \
&& gem update --system 3.2.20 \
&& gem install bundler -v 1.17.3 --no-document \
&& gem install bundler -v 2.2.20 --no-document \
&& gem install bundler -v 2.2.26 --no-document \
&& rm -rf /var/lib/gems/2.7.0/cache/* \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -88,29 +88,22 @@ ENV PYENV_ROOT=/usr/local/.pyenv \
PATH="/usr/local/.pyenv/bin:$PATH"
RUN mkdir -p "$PYENV_ROOT" && chown dependabot:dependabot "$PYENV_ROOT"
USER dependabot
RUN git clone https://github.com/pyenv/pyenv.git --branch v2.0.1 --single-branch --depth=1 /usr/local/.pyenv \
&& pyenv install 3.9.5 \
&& pyenv global 3.9.5 \
RUN git clone https://github.com/pyenv/pyenv.git --branch v2.1.0 --single-branch --depth=1 /usr/local/.pyenv \
&& pyenv install 3.10.0 \
&& pyenv global 3.10.0 \
&& rm -Rf /tmp/python-build*
USER root


### JAVASCRIPT

# Install Node 14.0 and npm (updated after elm)
# Install Node 14.0 and npm v7
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*

# NOTE: This was a hack to get around the fact that elm 18 failed to install with
# npm 7, we should look into installing the latest version of node + npm
RUN npm install -g npm@v7.10.0 \
&& rm -rf /var/lib/apt/lists/* \
&& npm install -g npm@v7.21.0 \
&& rm -rf ~/.npm

# NOTE: This was a hack to get around the fact that elm 18 failed to install with
# npm 7, we should look into installing the latest version of node + npm
RUN npm install -g npm@v7.10.0


### ELM

Expand Down Expand Up @@ -173,38 +166,36 @@ USER root

### GO

# Install Go and dep
ARG GOLANG_VERSION=1.16.3
ARG GOLANG_CHECKSUM=951a3c7c6ce4e56ad883f97d9db74d3d6d80d5fec77455c6ada6c1f7ac4776d2
ENV PATH=/opt/go/bin:$PATH \
GOPATH=/opt/go/gopath
# Install Go
ARG GOLANG_VERSION=1.17.3
ARG GOLANG_CHECKSUM=550f9845451c0c94be679faf116291e7807a8d78b43149f9506c1b15eb89008c
ENV PATH=/opt/go/bin:$PATH
RUN cd /tmp \
&& curl --http1.1 -o go.tar.gz https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz \
&& echo "$GOLANG_CHECKSUM go.tar.gz" | sha256sum -c - \
&& tar -xzf go.tar.gz -C /opt \
&& rm go.tar.gz \
&& mkdir "$GOPATH" \
&& chown dependabot:dependabot "$GOPATH" \
&& curl -sSLfo /opt/go/bin/dep https://github.com/golang/dep/releases/download/v0.5.4/dep-linux-amd64 \
&& chmod +x /opt/go/bin/dep
&& rm go.tar.gz


### ELIXIR

# Install Erlang, Elixir and Hex
ENV PATH="$PATH:/usr/local/elixir/bin"
# https://github.com/elixir-lang/elixir/releases
ARG ELIXIR_VERSION=v1.11.4
ARG ELIXIR_CHECKSUM=4d8ead533a7bd35b41669be0d4548b612d5cc17723da67cfdf996ab36522fd0163215915a970675c6ebcba4dbfc7a46e644cb144b16087bc9417b385955a1e79
ARG ERLANG_VERSION=1:23.3.1-1
RUN curl -sSLfO https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
&& dpkg -i erlang-solutions_1.0_all.deb \
ARG ELIXIR_VERSION=v1.12.3
ARG ELIXIR_CHECKSUM=db092caa32b55195eeb24a17e0ab98bb2fea38d2f638bc42fee45a6dfcd3ba0782618d27e281c545651f93914481866b9d34b6d284c7f763d197e87847fdaef4
# This version is currently pinned to OTP 23, due to an issue that we only hit
# in production, where traffic is routed through a proxy that OTP 24 doesn't
# play nice with.
ARG ERLANG_VERSION=1:23.3.4.5-1
RUN curl -sSLfO https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb \
&& dpkg -i erlang-solutions_2.0_all.deb \
&& apt-get update \
&& apt-get install -y --no-install-recommends esl-erlang=${ERLANG_VERSION} \
&& curl -sSLfO https://github.com/elixir-lang/elixir/releases/download/${ELIXIR_VERSION}/Precompiled.zip \
&& echo "$ELIXIR_CHECKSUM Precompiled.zip" | sha512sum -c - \
&& unzip -d /usr/local/elixir -x Precompiled.zip \
&& rm -f Precompiled.zip erlang-solutions_1.0_all.deb \
&& rm -f Precompiled.zip erlang-solutions_2.0_all.deb \
&& mix local.hex --force \
&& rm -rf /var/lib/apt/lists/*

Expand All @@ -224,7 +215,7 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
### Terraform

USER root
ARG TERRAFORM_VERSION=1.0.0
ARG TERRAFORM_VERSION=1.0.8
RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add -
RUN apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
&& apt-get update -y \
Expand All @@ -235,8 +226,8 @@ RUN apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(ls

USER root

COPY --chown=dependabot:dependabot LICENSE /home/dependabot
COPY --chown=dependabot:dependabot composer/helpers /opt/composer/helpers
COPY --chown=dependabot:dependabot dep/helpers /opt/dep/helpers
COPY --chown=dependabot:dependabot bundler/helpers /opt/bundler/helpers
COPY --chown=dependabot:dependabot go_modules/helpers /opt/go_modules/helpers
COPY --chown=dependabot:dependabot hex/helpers /opt/hex/helpers
Expand All @@ -245,15 +236,14 @@ COPY --chown=dependabot:dependabot python/helpers /opt/python/helpers
COPY --chown=dependabot:dependabot terraform/helpers /opt/terraform/helpers

ENV DEPENDABOT_NATIVE_HELPERS_PATH="/opt" \
PATH="$PATH:/opt/terraform/bin:/opt/python/bin:/opt/go_modules/bin:/opt/dep/bin" \
PATH="$PATH:/opt/terraform/bin:/opt/python/bin:/opt/go_modules/bin" \
MIX_HOME="/opt/hex/mix"

USER dependabot
RUN mkdir -p /opt/bundler/v1 \
&& mkdir -p /opt/bundler/v2
RUN bash /opt/bundler/helpers/v1/build /opt/bundler/v1
RUN bash /opt/bundler/helpers/v2/build /opt/bundler/v2
RUN bash /opt/dep/helpers/build /opt/dep
RUN bash /opt/go_modules/helpers/build /opt/go_modules
RUN bash /opt/hex/helpers/build /opt/hex
RUN bash /opt/npm_and_yarn/helpers/build /opt/npm_and_yarn
Expand Down
1 change: 0 additions & 1 deletion Dockerfile.ci
Expand Up @@ -8,7 +8,6 @@ WORKDIR ${CODE_DIR}

COPY --chown=dependabot:dependabot .rubocop.yml ${CODE_DIR}/.rubocop.yml
COPY --chown=dependabot:dependabot omnibus ${CODE_DIR}/omnibus
COPY --chown=dependabot:dependabot dep ${CODE_DIR}/dep
COPY --chown=dependabot:dependabot git_submodules ${CODE_DIR}/git_submodules
COPY --chown=dependabot:dependabot terraform ${CODE_DIR}/terraform
COPY --chown=dependabot:dependabot github_actions ${CODE_DIR}/github_actions
Expand Down
1 change: 0 additions & 1 deletion Dockerfile.development
Expand Up @@ -23,7 +23,6 @@ RUN cd common \
COPY --chown=dependabot:dependabot bundler/Gemfile bundler/dependabot-bundler.gemspec ${CODE_DIR}/bundler/
COPY --chown=dependabot:dependabot cargo/Gemfile cargo/dependabot-cargo.gemspec ${CODE_DIR}/cargo/
COPY --chown=dependabot:dependabot composer/Gemfile composer/dependabot-composer.gemspec ${CODE_DIR}/composer/
COPY --chown=dependabot:dependabot dep/Gemfile dep/dependabot-dep.gemspec ${CODE_DIR}/dep/
COPY --chown=dependabot:dependabot docker/Gemfile docker/dependabot-docker.gemspec ${CODE_DIR}/docker/
COPY --chown=dependabot:dependabot elm/Gemfile elm/dependabot-elm.gemspec ${CODE_DIR}/elm/
COPY --chown=dependabot:dependabot git_submodules/Gemfile git_submodules/dependabot-git_submodules.gemspec ${CODE_DIR}/git_submodules/
Expand Down
26 changes: 22 additions & 4 deletions README.md
Expand Up @@ -44,6 +44,21 @@ In addition to this library, you may be interested in:
GitLab or Azure DevOps
- The [API docs][api-docs] for Dependabot's hosted instance (dependabot.com)

## Cloning the repository
Clone the repository with Git using:

```
git clone https://github.com/dependabot/dependabot-core.git
```

On Windows this might fail with "Filename too long". To solve this, run the
following commands in the cloned Git repository:

1. `git config core.longpaths true`
2. `git reset --hard`

You can read more about this in the [Git for Windows wiki](https://github.com/git-for-windows/git/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path).

## Setup

To run all of Dependabot Core, you'll need Ruby, Python, PHP, Elixir, Node, Go,
Expand Down Expand Up @@ -101,16 +116,13 @@ $ bin/docker-dev-shell

### Dry run script

*Note: you must have run `bundle install` in the `omnibus` directory before
running this script.*

You can use the "dry-run" script to simulate a dependency update job, printing
the diff that would be generated to the terminal. It takes two positional
arguments: the package manager and the GitHub repo name (including the
account):

```bash
$ cd omnibus && bundle install && cd -
$ bin/docker-dev-shell
$ bin/dry-run.rb go_modules rsc/quote
=> fetching dependency files
=> parsing dependency files
Expand All @@ -130,6 +142,11 @@ Once that's finished, start the `Debug Dry Run` configuration `(F5)` and you'll
to select a package manager and a repository to perform a dry run on.
Feel free to place breakpoints on the code.

⚠️ The `Clone Repository ...` commands of the Remote Containers extension are currently
missing some functionality and are therefore not supported. You have to clone the
repository manually and use the `Reopen in Container` or `Open Folder in Container...`
command.

## Releasing

Triggering the jobs that will push the new gems is done by following the steps below.
Expand Down Expand Up @@ -227,6 +244,7 @@ Dependabot and Dependabot Core started life as [Bump][bump] and
GoCardless in helping make Dependabot possible - if you need to collect
recurring payments from Europe, check them out.


[dependabot]: https://dependabot.com
[dependabot-status]: https://api.dependabot.com/badges/status?host=github&identifier=93163073
[dependabot-script]: https://github.com/dependabot/dependabot-script
Expand Down
1 change: 0 additions & 1 deletion Rakefile
Expand Up @@ -24,7 +24,6 @@ GEMSPECS = %w(
bundler/dependabot-bundler.gemspec
elm/dependabot-elm.gemspec
cargo/dependabot-cargo.gemspec
dep/dependabot-dep.gemspec
npm_and_yarn/dependabot-npm_and_yarn.gemspec
composer/dependabot-composer.gemspec
hex/dependabot-hex.gemspec
Expand Down
2 changes: 1 addition & 1 deletion bin/bump-version.rb
Expand Up @@ -12,7 +12,7 @@
exit 1
end

unless `gh auth status > /dev/null 2>&1` && $?.success?
unless `gh auth status -h github.com > /dev/null 2>&1` && $?.success?
puts "Please login to GitHub first: gh auth login"
exit 1
end
Expand Down
6 changes: 0 additions & 6 deletions bin/docker-dev-shell
Expand Up @@ -172,12 +172,6 @@ docker run --rm -ti \
-v "$(pwd)/cargo/lib:$CODE_DIR/cargo/lib" \
-v "$(pwd)/cargo/spec:$CODE_DIR/cargo/spec" \
-v "$(pwd)/cargo/script:$CODE_DIR/cargo/script" \
-v "$(pwd)/dep/.rubocop.yml:$CODE_DIR/dep/.rubocop.yml" \
-v "$(pwd)/dep/Gemfile:$CODE_DIR/dep/Gemfile" \
-v "$(pwd)/dep/dependabot-dep.gemspec:$CODE_DIR/dep/dependabot-dep.gemspec" \
-v "$(pwd)/dep/lib:$CODE_DIR/dep/lib" \
-v "$(pwd)/dep/spec:$CODE_DIR/dep/spec" \
-v "$(pwd)/dep/script:$CODE_DIR/dep/script" \
-v "$(pwd)/go_modules/.rubocop.yml:$CODE_DIR/go_modules/.rubocop.yml" \
-v "$(pwd)/go_modules/Gemfile:$CODE_DIR/go_modules/Gemfile" \
-v "$(pwd)/go_modules/dependabot-go_modules.gemspec:$CODE_DIR/go_modules/dependabot-go_modules.gemspec" \
Expand Down

0 comments on commit c28c944

Please sign in to comment.