Giter Site home page Giter Site logo

okonomi / dependabot-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dependabot/dependabot-core

0.0 2.0 0.0 20.69 MB

๐Ÿค– The core logic behind Dependabot's update PR creation

Home Page: https://dependabot.com

License: Other

Dockerfile 0.14% Ruby 93.05% Shell 0.23% PHP 0.39% Makefile 0.01% Go 0.30% HTML 3.88% Kotlin 0.04% Elixir 0.24% JavaScript 0.98% Python 0.57% HCL 0.17%

dependabot-core's Introduction

Dependabot

Dependabot Core Dependabot Status

Dependabot Core is the heart of Dependabot. It handles the logic for updating dependencies on GitHub (including GitHub Enterprise) and GitLab. We plan to add support for Bitbucket and Azure DevOps in the future, too.

If you want to host your own automated dependency update bot then this repo should give you the tools you need. A reference implementation is available here.

What's in this repo?

Dependabot Core is a collection of helper classes for automating dependency updating in Ruby, JavaScript, Python, PHP, Elixir, Elm, Go, Rust, Java and .NET. It can also update git submodules, Docker files and Terraform files. Highlights include:

  • Logic to check for the latest version of a dependency that's resolvable given a project's other dependencies
  • Logic to generate updated manifest and lockfiles for a new dependency version
  • Logic to find changelogs, release notes, and commits for a dependency update

Other Dependabot resources

In addition to this library, you may be interested in:

  • The dependabot-script repo, which provides a collection of scripts that use this library to update dependencies on GitHub Enterprise or GitLab
  • The API docs for Dependabot's hosted instance (dependabot.com)

Setup

To run all of Dependabot Core, you'll need Ruby, Python, PHP, Elixir, Node, Go, Elm and Rust installed. However, if you just wish to run it for a single language you can get away with just having that language and Ruby.

The main library is written in Ruby, while JavaScript, Python, PHP, Elm, Elixir, Go and Rust are required for dealing with updates for their respective languages.

Before running Dependabot Core, install dependencies for the core library and the helpers:

  1. bundle install
  2. cd helpers/yarn && yarn install --production && cd -
  3. cd helpers/npm && npm install --production && cd -
  4. cd composer/helpers && composer install --no-dev && cd -
  5. cd python/helpers && pyenv exec pip install -r requirements.txt && cd -
  6. cd elixir/helpers && mix deps.get && cd -

Architecture

Dependabot Core has helper classes for seven concerns. Where relevant, each concern will have a language-specific class.

Service Description
Dependabot::FileFetchers Fetches the relevant dependency files for a project (e.g., the Gemfile and Gemfile.lock). See the file fetchers for more details.
Dependabot::FileParsers Parses a dependency file and extracts a list of dependencies for a project. See the file parsers for more details.
Dependabot::UpdateCheckers Checks whether a given dependency is up-to-date. See the update checkers for more details.
Dependabot::FileUpdaters Updates a dependency file to use the latest version of a given dependency. See the file updaters for more details.
Dependabot::MetadataFinders Looks up metadata about a dependency, such as its GitHub URL. See the metadata finders for more details.
Dependabot::PullRequestCreator Creates a Pull Request to the original repo with the updated dependency file.
Dependabot::PullRequestUpdater Updates an existing Pull Request with new dependency files (e.g., to resolve conflicts).

Why is this public?

As the name suggests, Dependabot Core is the core of Dependabot (the rest of the app is pretty much just a UI and database). If we were paranoid about someone stealing our business then we'd be keeping it under lock and key.

Dependabot Core is public because we're more interested in it having an impact than we are in making a buck from it. We'd love you to use Dependabot, so that we can continue to develop it, but if you want to build and host your own version then this library should make doing so a lot easier.

If you use Dependabot Core then we'd love to hear what you build!

License

We use the License Zero Prosperity Public License, which essentially enshrines the following:

  • If you would like to use Dependabot Core for non-commercial purposes, such as to host a bot at your workplace, then we give you full permission to do so. In fact, we'd love you to, and will help and support you however we can.
  • If you would like to add Dependabot's functionality to your for-profit company's offering then we DO NOT give you permission to use Dependabot Core to do so. Please contact us directly to discuss a partnership or licensing arrangement.

If you make a significant contribution to Dependabot Core then you will be asked to transfer the IP of that contribution to Dependabot Ltd so that it can be licensed in the same way as the above.

History

Dependabot and Dependabot Core started life as Bump and Bump Core, back when Harry and Grey were working at GoCardless. We remain grateful for the help and support of GoCardless in helping make Dependabot possible - if you need to collect recurring payments from Europe, check them out.

dependabot-core's People

Contributors

alcaeus avatar bai avatar codisart avatar dependabot-support avatar dependabot[bot] avatar evenh avatar feelepxyz avatar georgetaveras1231 avatar gocardless-robot avatar greysteil avatar hmac avatar hmarr avatar jacobpgn avatar lenntt avatar leocolomb avatar lipis avatar maxmommersteeg avatar michaelglass avatar mockersf avatar nickcampbell18 avatar nlopes avatar olleolleolle avatar omnibs avatar petehamilton avatar rullzer avatar squirly avatar stevedomin avatar tristan0x avatar virtualroot avatar waltfy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.