Repository

Use the repository command to raise multiple pull requests against a GitHub repository. The repository does not need to be present on the file system beforehand. It will be fetched to a temporary folder.

If you run these command lines regularly, you can automatically get update pull requests like this one and always keep a project’s dependencies up to date.

Raising a pull request is intended to hook into the automated tests and manual review process that you use. You can then choose to merge or reject the pull request based on the outcome.

In order to work with repositories, you will first need a personal access token.

Github

nukeeper repo https://github.com/myorg/myrepo token

Azure DevOps

nukeeper repo https://dev.azure.com/{org}/{project}/_git/{repo}/ token

The minimum scope of access associated for the token to make NuKeeper work is “Code (Read & write)“.

With Arguments

I want one Pull Request that applies a top ten updates to my repository

nukeeper repo url token --maxpackageupdates 10 --consolidate

I want one Pull Request that applies updates to all packages of the AWS SDK:

nukeeper repo url token --maxpackageupdates 100 --include ^AWSSDK. --consolidate

PR from local repository

This is only available for azure devops and vsts

//TODO

Using a targetBranch

This is only available for azure devops, vsts and github right now

In some cases you want NuKeeper not to run on the default branch but on a specific (feature-)branch e.g. when you want to keep the feature branches for a certain feature updated and in sync across repositories. The –targetBranch option makes this possible. It will create pull-requests on a specific branch if updates are required.

I want one Pull Request that applies updates to all packages to the feature-branch CoolNewFeature:

nukeeper repo url token --consolidate --targetBranch CoolNewFeature

Hidden token

The token is a secret; often you don’t want to put it on the command line, e.g. if this command line is in a script stored in a public repository. In that case, you can put it in the appropriate environment variable blow and NuKeeper will automatically read it from there. NuKeeper_github_token Nukeeper_azure_devops_token

set NuKeeper_github_token=mygithubtoken

Custom GitHub API server

If you have a a different GitHub server, e.g. one hosted inside your organisation, you need to find out where its API root URL is. You can specify it to Nukeeper with e.g. --api=https://github.mycompany.com/api/v3. The default is the public API at https://api.github.com

The host must contain the word github to be able to select the right platform.

Options for controlling pull requests

NuKeeper often operates in a target-rich environment, where you don’t want to raise all the potential pull requests at once.

NuKeeper sorts the pull requests, using heuristics so that more impactful updates are at the top, but you also can control how many pull requests are raised, when and what levels of change.

Examples

--maxpackageupdates 2 Limit to two pull requests generated by a run. The default value is 3.

--change minor Do not allow major version changes.

--age 10d Do not apply any version change until it has been available for 10 days. The default is 7 days. You can also specify this value in weeks with e.g. age=6w or hours with e.g. age=12h.