Skip to content
Snippets Groups Projects
README.md 1.57 KiB
Newer Older
Rhys Arkins's avatar
Rhys Arkins committed
# renovate

Rhys Arkins's avatar
Rhys Arkins committed
Keep npm dependencies up-to-date via Pull Requests
Rhys Arkins's avatar
Rhys Arkins committed

## Before you Start

To run this script, you will need to select a GitHub account for it to use. The account will need read/write access to push and update upgrade branches to GitHub, as well as raise Pull Requests.

Rhys Arkins's avatar
Rhys Arkins committed
We recommend using a "bot" account so that it's clear to other users of the repository that these are automated actions and not a team member performing them all manually.
Rhys Arkins's avatar
Rhys Arkins committed

Rhys Arkins's avatar
Rhys Arkins committed
The script will need a GitHub "access token" for authenticating API access. You can find instructions for generating it here: https://help.github.com/articles/creating-an-access-token-for-command-line-use/
Rhys Arkins's avatar
Rhys Arkins committed

Rhys Arkins's avatar
Rhys Arkins committed
This token needs to be exposed via the environment variable `RENOVATE_TOKEN`.
Rhys Arkins's avatar
Rhys Arkins committed

## Running the Script

To run the script from the command line, you will need Node.js version 6 or greater.

First, install dependencies for this script by running `npm install`.

 The script can then be run like this:

```sh
Rhys Arkins's avatar
Rhys Arkins committed
node src <username>/<repo> <path to package.json>
Rhys Arkins's avatar
Rhys Arkins committed
```

The `<path to package.json>` argument is optional, and is only needed if your `package.json` is located somewhere other than the root of the repository.

Example of running with default `package.json` location:

```sh
Rhys Arkins's avatar
Rhys Arkins committed
node src singapore/renovate
Rhys Arkins's avatar
Rhys Arkins committed
```

Example of running with a custom `package.json` location:

```sh
Rhys Arkins's avatar
Rhys Arkins committed
node src singapore/renovate containers/build/package.json
Rhys Arkins's avatar
Rhys Arkins committed
```

Note: as mentioned above, you need to expose the environment variable `RENOVATE_TOKEN`. One way of doing it is like this:

```sh
Rhys Arkins's avatar
Rhys Arkins committed
RENOVATE_TOKEN=JDSUW284HSJDSFKSUS22942H2H15KK node src singapore/renovate
Rhys Arkins's avatar
Rhys Arkins committed
```