is there a way to create a GitHub pull request which updates the version of a submodule to the latest commit on its main branch

Issue

Same as this question Pull latest changes for all git submodules but I am looking for a way to create a GitHub pull request which updates the version of that submodule to the latest commit on its main branch.
This is to be run on a regular schedule and also automatically add a set of GitHub users as reviewers on the pull request.
Is this possible? any suggestions would be great. Couldn’t find a way to create a PR anywhere online. All answers point to pulling the changes

Solution

I would suggest you to use Dependabot that creates pull requests to keep your dependencies secure and up-to-date. As example, for git submodules, just add a file like this:

.github/dependabot.yml

# This dependabot.yml file will updates git submodules
version: 2
updates:

  # Maintain dependencies git submodules
  - package-ecosystem: "gitsubmodule"
    directory: "/"
    schedule:
      interval: "daily"

More info also here

Answered By – Matteo

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published