A script to upgrade the version of Ruby used by a project.
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.
It's advised not to use your personal GitHub account to create the access token, as another developer will need to approve the PRs. You can use govuk-ci GitHub account.
Install dependencies:
pipenv install
Configure which Ruby versions should be upgraded.
When upgrading a specific list of repos (e.g. only those owned by your team), set up the list of repos with hardcoded values:
repos = [
'alphagov/authenticating-proxy',
'alphagov/bouncer',
]
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.