Skip to main content

Repository: upgrade-ruby-version

A script to upgrade the version of Ruby used by a project.

Ownership
#govuk-platform-reliability-team
Hosting
N/A
Category
Utilities

README

A script to upgrade the version of Ruby used by a project.

Setup

Create a .env file with the following contents:

GITHUB_ACCESS_TOKEN=personal_access_token

You’ll need to create a personal access token with a repo scope so that you have write access to GOV.UK repositories.

Install dependencies:

pipenv install

Configure the script

Get an updated list of repos:

curl https://docs.publishing.service.gov.uk/repos.json | jq -r ".[].app_name | \"'alphagov/\" + . + \"',\""

Set the list of repos and configure which Ruby versions should be upgraded.

Run the script

This will open pull requests in every repository you’ve configured it to:

pipenv run python main.py

You can see the created PRs by visiting https://github.com/pulls.