Commit Graph

2547 Commits

Author SHA1 Message Date
Rhys Arkins 85dfa819c1 fix: skip newlines at start of Dockerfile (#1402)
Allow for both comment lines or empty lines prior to FROM in Dockerfile
2018-01-17 17:58:28 +01:00
Rhys Arkins ac09b9d7cd feat: cache npm results in memory per-run
We currently use got’s inbuilt caching for npmjs, however it still results in a roundtrip/304 even when cached. The when using presets is that a package like renovate-config-default gets looked up 10+ times unnecessarily. With this feature we assume that npm lookups don’t change for the duration of a run, and even if they did then we’d prefer the reliability of using the first lookup.

Closes #1389
2018-01-15 11:53:02 +01:00
Rhys Arkins b5db28b242 fix: propagate registry-failure errors to avoid config validation warnings
We don’t want npmjs 5xx errors to cause config validation Issues in repositories.

Closes #1388
2018-01-14 18:58:49 +01:00
Rhys Arkins 2a5f189573 fix: ignore onboarding branch when calculating pr hourly limit 2018-01-12 10:02:36 +01:00
Rhys Arkins dba574950b feat: baseBranches (multi-branch) support (#1379)
This PR adds the capability to renovate more than one base branch at a time. For instance, a project may have their released `3.x` version on `master`, while an upcoming `4.x` is being prepared using branch `next`. `4.x` might have a quite different set of dependencies (e.g. some removed or some added) so it's not appropriate to only target `master` and keep rebasing, as it will get messy. Instead, it's necessary to target both `master` and `next` to keep both updated.

Closes #1279
2018-01-12 07:47:18 +01:00
Rhys Arkins 2dcb2a70d8 feat: prHourlyLimit
Adds a feature to enforce an hourly limit on PR creations.

Closes #1363
2018-01-11 11:56:16 +01:00
Matt R. Wilson d0d62e6e7b Allow --renovate-fork Cli flag for onboarding.
Fixes https://github.com/renovateapp/renovate/issues/1371.
2018-01-10 22:52:36 +01:00
Rhys Arkins 2925c0d9a7 feat: automatically group @types companion packages
By stripping ‘types/ from the branch name, package x and @types/x then become automatically combined in the same PR. We then massage it a little to ensure the decription for the non-types package is used, and a note added saying that types is included.

Closes #1365
2018-01-10 15:35:14 +01:00
Rhys Arkins 2e2f53b677 fix: move debug statement to fix tests 2018-01-10 09:38:42 +01:00
Rhys Arkins a2b3ca440d refactor: debug if repoIsOnboarded 2018-01-10 09:09:17 +01:00
Rhys Arkins 228b823e45 fix: ignore branchPrefix for onboarding branch 2018-01-09 17:24:09 +01:00
Rhys Arkins 910793e5f2 fix: check onboarding pr when handling config error
Instead of checking for config.repoIsOnboarded, just check for the onboarding PR and reverse the logic.

Closes #1339
2018-01-08 15:53:52 +01:00
Rhys Arkins 1bbf0c1692 fix: don’t apply custom branchPrefix when onboarding 2018-01-06 10:19:00 +01:00
Rhys Arkins b711e0c3aa fix: handle 404 repos gracefully 2017-12-31 20:47:46 +01:00
Rhys Arkins 24b94765ff feat: skip over archived repositories (github) 2017-12-31 20:28:22 +01:00
Rhys Arkins 1cb920fa4b fix: set/reset npmrc during init
Detect npmrc in root of repo and make sure it’s set early. Also ensure npmrc is reset at start of each run if necessary.

Helps #1335
2017-12-30 06:11:04 +01:00
Rhys Arkins 45d7c8f257 fix: check pr state for open or opened 2017-12-30 06:03:57 +01:00
Rhys Arkins e735ed9eb0 feat: restart renovation if any pr has changed from open to closed 2017-12-28 17:21:06 +01:00
Rhys Arkins e0e0b9defe fix: Revert "feat: restart renovation after github error"
This reverts commit eb579ff388.

For some reason it seems to be causing a reduction in throughput per hour in the app once deployed.
2017-12-26 19:45:17 +01:00
Rhys Arkins eb579ff388 feat: restart renovation after github error
When 404 or 422 errors are encountered writing updates, Renovate will now restart in an attempt to fix it. Usually this is because branches/PRs have been edited or closed while Renovate is running.

Closes #1299
2017-12-26 06:26:33 +01:00
Rhys Arkins 4ec85ad818 feat: use version in pr title for synchronised groups (#1333)
Now, if every upgrade in a group has the same new version, then the PR title will include this version.

Closes #1332
2017-12-24 11:14:34 +01:00
Rhys Arkins 146e8f6982 feat: skip onboarding if renovate config detected in root package.json (#1322)
Renovate will now detect if renovate config already exists within the project’s ‘package.json’ root, and skip onboarding if so.

Closes #1159
2017-12-22 19:14:26 +01:00
Rhys Arkins f4364ccc44 fix: isOnboarded should return true if onboarding is skipped 2017-12-22 18:50:41 +01:00
Rhys Arkins 2c6a2dd43b feat: better semantic commit detection
Limit to looking at last 10 commit messages and only use semantic commits if angular type is found.
2017-12-19 19:45:34 +01:00
Rhys Arkins eeefc3c8f3 feat: stop and raise error if repository is misconfigured (#1302)
This PR updates Renovate to detect config validation problems and (1) stop processing, and (2) either raise an Issue if already onboarded, or (2) update the onboarding PR to reflect the error if still onboarding.

Closes #1300
2017-12-18 09:39:52 +01:00
Rhys Arkins cfd02be920 refactor: log renovateConfig when warning of validation errors 2017-12-16 07:09:54 +01:00
Rhys Arkins b5b714d4b5 fix: writeToken -> forkToken (#1295)
Rename writeToken to forkToken to make it clearer. This enables GitHub API to use one token for all reads, and another token just for writing to the forked repository.
2017-12-14 11:47:00 +01:00
Rhys Arkins bbb700c54d feat: add github writeToken capability in github wrapper 2017-12-12 14:54:09 +01:00
Rhys Arkins cb8fd6b4ed feat: fork mode (#1287)
This PR adds the capability to run Renovate in a new "fork mode". This new mode must be configured by the Renovate admin, and cannot be configured within repositories themselves (for now). Example use: `renovate --autodiscover --fork-mode`

In this mode: 
* Renovate will fork the repository if necessary (first run only)
* If the fork already existed, Renovate will ensure that its base branch is up to date with the source repository's
 * Branches will be created within the fork, PRs will be created in the source
2017-12-11 19:14:51 +01:00
Rhys Arkins 61b1c7f25c refactor: sort branches
This makes the onboarding PR easier to understand by putting pin first, then minor, then major.
2017-12-08 11:03:45 +01:00
Rhys Arkins 696aaa38af refactor: slim down onboarding PR description (#1274) 2017-12-07 13:32:56 +01:00
Rhys Arkins 987891ba2e feat: bazel WORKSPACE support (#1268)
This PR adds support for bazel WORKSPACE package files, as suggested https://github.com/alexeagle/angular-bazel-example/issues/17#issuecomment-349167982

Renovate will:
1. Detect `WORKSPACE` files anywhere in the repository
2. Look for all `git_repository()` sections in the file
3. Extract any dependencies with name, remote and tag values
4. Look up any dependencies that (a) have a github https remote, and (b) a valid semver as tag
5. Update the tag to the latest available
2017-12-07 09:22:10 +01:00
renovate[bot] 73506f9043 chore(deps): update dependency prettier to v1.9.0 (#1267)
* chore(deps): update dependency prettier to v1.9.0

* run prettier
2017-12-05 11:50:16 +01:00
Rhys Arkins b8dadb718d feat: travis.yml node_js versions support (#1243)
This PR adds support for renovating the `node_js` versions in `.travis.yml` configuration files. Important notes:
- Functionality is disabled by default and hence opt-in via configuration
- Added a new manager type `node` because it is anticipated to support more than just Travis in future, with mostly unified logic
- Added the config option "policy" with supported values: lts, active, current, lts_latest and lts_active
- Policy is actually an array, to allow additive combining, e.g. `["lts_latest", "current"]`
- Actual node versions are *hardcoded*. There is no perfect metadata source for this and they change infrequently enough that it is definitely not a problem for now (next change will be in April 2018)
- If node versions need updating, they are listed from newest to oldest
- Replacing function attempts to detect the indention (spacing) in file and use that

To enable, configure `node.enabled=true` and optionally `node.policy=["<policy>"]` if you want something other than `lts`.

Closes #1208
2017-12-05 07:50:16 +01:00
Rhys Arkins 15dfad63b5 refactor: return ‘onboarding’ from ensureOnboardingPr (#1250) 2017-11-28 14:58:18 +01:00
Rhys Arkins 72d46c20e2 refactor: remove label and assignees description from onboarding pr (#1235)
These can now be described via presets instead
2017-11-24 12:03:57 +01:00
Rhys Arkins 7e6befe4a8 fix: merged PRs should not block new PRs in monorepos (#1230)
Only block if it was closed unmerged.

Fixes #1205

* check for closed only for monorepos
2017-11-24 07:31:20 +01:00
Rhys Arkins 65a5e90bb7 feat: split semanticPrefix into type and scope 2017-11-24 07:14:58 +01:00
Rhys Arkins d3d9b2be02 refactor: packageFile log debug -> trace (#1191) 2017-11-17 15:10:59 +01:00
Rhys Arkins 414fb7d4d7 chore: add debugging to checkOnboardingBranch 2017-11-16 14:16:24 +01:00
Rhys Arkins 7c72156562 refactor: move semantic commit detection from init to later updates (#1170) 2017-11-15 13:39:44 +01:00
Rhys Arkins b3ec1c0156 fix: set npmrc at repository level (#1169) 2017-11-15 12:30:39 +01:00
Rhys Arkins c3d84d4767 fix: find .renovaterc.json when onboarding (#1145) 2017-11-11 05:18:24 +01:00
Rhys Arkins ede1a59527 feat: support .renovaterc json configuration file (#1142)
Renovate will now check for `renovate.json`, `.renovaterc`, and `.renovaterc.json` in that order. JSON-only supported (no YAML).

Closes #969
2017-11-10 14:10:16 +01:00
Rhys Arkins 8a87bcd918 feat: rebase onboarding branch (#1139)
Previously, Renovate's "Configure Renovate" onboarding branch would never get rebased after it was created. Now, it will be rebased every time the base branch is updated, unless the list of modified files is more than `renovate.json` alone.

Closes #1111
2017-11-10 13:07:06 +01:00
Rhys Arkins f044aca321 refactor: streamline platform file operations (#1121)
Remove original getFile, getFileContent, and getFileJson and replace with getFile (which used to be getFileContent.. shortened now for convenience). Also remove unused getSubdirectories functions.
2017-11-08 12:23:32 +01:00
Rhys Arkins 8c479071fd refactor: use global logger (#1116) 2017-11-08 06:44:03 +01:00
Rhys Arkins 602752f9fe refactor: use platform global (#1115) 2017-11-07 13:31:34 +01:00
renovate[bot] c1df1b2cb8 chore(deps): update dependency prettier to v1.8.0 (#1113)
* chore(deps): update dependency prettier to v1.8.0

* reformat
2017-11-07 11:52:15 +01:00
Rhys Arkins f8be45055a refactor: remove config.api and use platform dispatcher (#1114) 2017-11-07 11:46:10 +01:00