Skip to content

Update renovate config in all your repositories in one go

Notifications You must be signed in to change notification settings

runely/update-renovate-config

Repository files navigation

Update renovate config for all your repositories

Setup

  1. git clone [email protected]:runely/update-renovate-config.git
  2. npm i
  3. Create a renovate_preset.json file or rename renovate_preset_example.json, containing your new renovate config to be used in all your repos
  4. Create a personal access token with repo scope
  5. Create a .env file:
    GITHUB_USERNAME=<GitHub username where personal-access-token is created>
    GITHUB_PERSONAL_ACCESS_TOKEN=<personal-access-token>
    GITHUB_REPO_USERNAME=<Add this line to fetch repos from this user>
    GITHUB_REPO_ORGNAME=<Add this line to fetch repos from this organization>
    RENOVATE_CONFIG=<Full path to renovate_preset.json file>
    RENOVATE_COMMIT_MESSAGE=<Your own commit message. If set to empty or removed, a default commit message will be used>

Make sure GITHUB_USERNAME has read/write access to both GITHUB_REPO_USERNAME and GITHUB_REPO_ORGNAME!

If both GITHUB_REPO_USERNAME and GITHUB_REPO_ORGNAME are set, GITHUB_REPO_ORGNAME will be used!

Usage

  1. Run npm run get-repos to create a repos.json file in the data folder containing an array of all your repos
  2. Run npm run get-renovate-repos to find which repos actually use renovate
  3. Run npm run clone-repos to clone down a fresh copy of all repos. They will be saved in ./repos folder
  4. Run npm run update-repos to update renovate config in all repos

❗ This tool will only modify and commit to a repository if:

  • It's not archived
  • It already has a renovate.json file
  • renovate.json file is different from renovate_preset.json setup earlier

About

Update renovate config in all your repositories in one go

Resources

Stars

Watchers

Forks

Packages

No packages published