Giter Site home page Giter Site logo

elevate_test_pt2's Introduction

Elevate DevOps test pt2

The problem

Our code is organized such that some of the repositories are included as submodules in others. Since we update these dependencies regularly, it’s important to keep them updated in the repositories that use them. Given a submodule named content, please implement a solution to create a GitHub pull request which updates the version of that submodule to the latest commit on its main branch. Your solution should run on a regular schedule and also automatically add a set of GitHub users as reviewers on the pull request.

Solution

In order to accomplish this we rely on dependabot, a tool from GitHub that facilitates the dependecy updates in our repositories. To start with it, we need to create a configuration file called dependabot.yaml at the .github subdirectory.

version: 2
updates:
  - package-ecosystem: "gitsubmodule"
    directory: "/"
    schedule:
      interval: "daily"
    reviewers:
      - "crosvera"

In this configuration file we can set the different dependencies update mechanisms, in this case we are using gitsubmodule. dependabot will check all submodules under the directory. You can set the frequency that dependabot can check for dependency updates using the schedule.interval option. dependabot will gather all the updates available for our dependencies and will push them as a PR, in order to add reviewers to that PR, we can set the reviewers option with the usernames of the GitHub accounts.

This approach will only works if the submodules are public Github repositories. But if the submodule and the repository that is using it are in the same project, you can configure dependabot to allow it to update it.

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.