Commit Graph

51 Commits (v9.37.0)

Author SHA1 Message Date
Rhys Arkins d7a6bbe367 feat: unpublish-safe status check ()
Renovate now adds a status check renovate/unpublish-safe that has the following behaviour:
If any upgrade in the branch is < 24 hours old then the status check state is "pending"
If all upgrades in the branch are 24 hours or more old then the status check state is "success"
This is able to be disabled via a new option "unpublishSafe".

Closes 
2017-08-06 15:38:10 +02:00
Hutson Betts 4b60bb2d17 fix(gitlab): only fetch projects user belongs to ()
Fixes 
2017-08-05 21:53:22 +02:00
Rhys Arkins cb3c4ece38 refactor: improve github retry logic ()
5 retries
use settimeout
retry on any 5xx error code
2017-08-04 18:13:49 +02:00
Rhys Arkins 6a7f57165f fix: add loki-preview headers to repository query ()
Should enable merge settings to be shown during initRepo
2017-08-04 14:51:21 +02:00
Rhys Arkins 134065c7c7 refactor: use branch prefix in templates ()
This allows for the easy overriding of our default `renovate/` branch naming.

Closes 
2017-08-04 08:32:22 +02:00
Rhys Arkins db2e6dd1b9 refactor: Convert Object.assign to spread ()
Closes 
2017-08-03 08:01:20 +02:00
Rhys Arkins 8fc97af5c7 feat: Ignore forked repositories unless already configured ()
This feature is particularly useful in the case that renovate is enabled on all repositories a user/account has. Many of those might be forks, and it makes no sense to renovate those by default. Instead, Renovate will skip over forked repositories unless a renovate.json has been added to their root.
Also, Renovate will now prune branches after deciding to skip a repository, whether because of a fork or disablement.

Closes 
2017-07-30 22:59:53 +02:00
Rhys Arkins 603f63af4d fix: Retry github API when 502 error ()
The GitHub API will now retry up to 3 times before giving up, if it is receiving a 502 Bad Gateway response.
2017-07-30 11:06:15 +02:00
Rhys Arkins 8aafdaf182 refactor: Use promise.reject to simulate non-200 responses in github tests () 2017-07-30 08:20:19 +02:00
Rhys Arkins feffa774d8 feat(lerna): Add lerna support ()
If a `lerna.json` is present in the root of the repository, then Renovate will automatically ignore (i.e. not renovate) all package names found in the `packages/*` path. It does not require an explicit configuration to work.
2017-07-27 09:36:36 +02:00
Rhys Arkins f866f54a14 fix(github): Return repoForceRebase to main config () 2017-07-26 10:56:11 +02:00
Rhys Arkins cd2b1193ad fix(github): Use more specific URI when checking branch protection () 2017-07-26 08:19:27 +02:00
Rhys Arkins 1eea69f164 fix(github): Gracefully catch 403 response to branch protection () 2017-07-26 06:55:25 +02:00
Rhys Arkins 2331d6e840 feat(branch): Check for rebase if repo branch protection is strict ()
We now check branch protection configuration for the repository's base branch to see if branches must be kept up-to-date. If so then we check Renovate branches for rebasing even if rebaseStalePrs is not set to true.

Closes 
2017-07-25 18:18:19 +02:00
Rhys Arkins 64e91eed0f fix(github): Hyperlink issues on GitHub only if private repo ()
Adding hyperlinks to all  issues/PRs in upstream dependencies causes undesirable noise for maintainers of those repositories.
Now, such hyperlinking is done only for private repos as that won’t result in the same GitHub annotations.

Closes 
2017-07-09 15:13:03 +02:00
Rhys Arkins 06504b4abe feat(onboarding): conventional commits detection ()
When onboarding, retrieve the most recent commits from the repository and use https://github.com/conventional-changelog/conventional-commits-detector to parse the commit messages to detect if any conventional commit approach is being used.

Closes 
2017-07-07 07:54:09 +02:00
Rhys Arkins eb468341c4 fix: Don’t stringify options body for PR labels ()
This has been broken since the upgrade to got 7.x

Closes 
2017-07-06 19:24:09 +02:00
Rhys Arkins 997c4efac2 feat: baseBranch onboarding ()
baseBranch is now used when computing the onboarding description in 'Configure Renovate' PR.
2017-07-06 14:12:52 +02:00
Rhys Arkins dc5773c2e5 feat: Configurable base branch for PRs ()
Collaborator
rarkins commented 14 hours ago
Base branch for Pull Requests is now configurable via a new baseBranch configuration option. To take effect, this much be present in the default branch (e.g. master in most cases) so that it can be discovered and used. See FAQ for more details.

Closes 
2017-07-06 10:26:18 +02:00
Rhys Arkins ea4e370d3f feat: Prune stale branches ()
A separate routine is run after branch creation to detect any branches that should be deleted. A branch will be removed if:
- It was not created by renovate in the last run, AND
- It has no PR, or its corresponding PR is not mergeable

Closes , Closes 
2017-07-05 11:57:22 +02:00
Rhys Arkins c30472dd43 feat: Add ability to skip status checks for automerge ()
This starts off [](https://github.com/singapore/renovate/issues/359) (configurable status checks) but only implements one sub-feature of it: disabling status checks to allow automerge if tests fail or if no tests are present.
2017-07-05 07:02:25 +02:00
Rhys Arkins 6034159909 Fix: add extra check for commit author ()
* fix: Detect undefined commit.author

Closes 

* refactor author check

* Add debug

* Update test
2017-07-04 19:22:09 +02:00
Rhys Arkins 6dc143e76c fix: delete token before npm api tests () 2017-07-02 21:29:09 +02:00
Rhys Arkins faa754d136 Use NPM_TOKEN for registry lookup 2017-07-02 20:52:31 +02:00
Rhys Arkins fe82c7ad7c Skip repositories with no package.json ()
* Skip repositories with no package.json

Closes 

* Fix await

* Refactor file file check

* Update tests
2017-06-28 19:37:08 +02:00
Rhys Arkins 698a63ad32 Fetch multiple pages from gitlab projects api endpoint ()
Fixes 
2017-06-28 15:01:05 +02:00
Rhys Arkins 085e0ed3e4 Return default package.json if GitHub api finds no files 2017-06-28 11:39:51 +02:00
Rhys Arkins a952506259 Perform gitlab terminology translation in api () 2017-06-28 10:10:40 +02:00
Rhys Arkins 6d99afb656 Get repository url from npm query ()
* Get repositoryUrl from npm

Closes 

* Generate repository url from npm query

Closes 
2017-06-27 17:35:23 +02:00
Rhys Arkins 08f7a5ca91 Complete code coverage () 2017-06-25 08:14:59 +02:00
Rhys Arkins 19f4b3b0bc Refactor repository worker ()
* Move to subdir

* Downgrade eslint to 3

* Refactor api and config usage

* Refactor mergeRenovateJson

* Test mergeRenovateJson

* getOnboardingStatus tests

* Refactor repository structure

* Refactor config.logger

* Revert "Refactor config.logger"

This reverts commit 6d7f81af6e.

* Refactor repository logging

* Refactor try/catch

* Refactor platform and onboarding

* Refactor setNpmrc

* Fix github logger

* npm api use config.logger

* Refactor repo worker logger

* Refactor repo worker

* Refactor branched upgrades

* Repository refactoring

* Move some debug logging to trace

* Deprecate fileName

* Refactor upgrades

* Refactor repository logs

* More repository log refactoring

* Refactor repository location

* Revert "Refactor repository location"

This reverts commit faecbf2951.

* Fix tests

* mergeRenovateJson

* Recombine repository worker

* Add initApis tests

* add detectPackageFiles tests

* Add determineRepoUpgrades tests

* start groupUpgradesByBranch tests

* add test

* add test

* Finish groupUpgradesByBranch coverage

* Test updateBranchesSequentially

* Finish repo coverage

* Finish branch worker coverage

* Finish workers coverage

* Fix isPin

* Complete workers coverage

* Finish helpers coverage

* Add gitlab api tests

* getBranchStatus tests

* test createPr

* start getPr testing

* getPr

* update and merge PR tests

* getFile

* getFileContent tests

* getFileJson tests

* createFile

* updateFile

* createBranch

* commitFilesToBranch

* update yarn

* Update yarn
2017-06-25 07:36:13 +02:00
Rhys Arkins 887efe2ac8 Unit test gitlab api ()
Closes 
2017-06-25 07:11:24 +02:00
Rhys Arkins 53a316d1c3 Improve test coverage ()
* Fix github api coverage

* Fix npm api coverage

* Fix renovate init function coverage

* Start gitlab tests

* gitlab initRepo tests

* findFilePaths

* Add branchExists tests

* Fix branch worker coverage

* pr worker

* Refactor repository functions

* Refactor gitlab getRepos
2017-06-22 21:35:32 +02:00
Rhys Arkins 112ff0b410 Support branch automerging ()
Add support for automerging without PR, Closes  

* update definitions and docs


* Add mergeBranch api

* support merge commit

* set automergeType

* Update API

* Refactor merge commit

* branch-push working

* Refactor branch

* Add back base tree

* Fix failing tests

* Update definitions and docs

* Fix automerge logic

* Test isBranchStale

* start mergeBranch test

* test mergeBranch branch-push throws

* more tests

* test unknown commit type

* pr tests

* Detect automerge in versions helper

* update tests for new automergeEnabled flag

* refactor pr logic

* complete pr worker tests

* branch automerge tests

* Update docs

* refactor branch automerge check
2017-06-08 06:18:21 +02:00
Hutson Betts 623a720ba5 fix(npm): accept JSON as fallback in content negotiation ()
Accept `application/json` as content type fallback in case user is accessing
npm registry that does not support the new `npm.install` content type.
2017-06-07 21:30:37 +02:00
Rhys Arkins d293143475 Fix github api base branch update ()
* Update base commit SHA after merge

* drop unnecessary getcommittree
2017-06-07 15:42:20 +02:00
Rhys Arkins 88648ab4a5 Add npm caching ()
* use snapshots

* Use npm cache

Closes 

* Add test for caching
2017-06-05 12:13:39 +02:00
Rhys Arkins 156e104b5f Gracefully handle 404’s for npm module lookup ()
Closes , Closes 
2017-06-04 12:34:04 +02:00
Rhys Arkins a50e65e143 Add robustness to package.json parsing ()
* Add robustness to package.json parsing

* Add tests
2017-06-04 08:06:40 +02:00
Rhys Arkins 79de1b1ef3 Use npm Registry Filter Header ()
Closes 
2017-06-04 07:10:12 +02:00
Rhys Arkins 1bd22611fd Fix GitHub app merge ()
* Add installation debug

* Update initRepo merge detection

* mergePr tests

* guess squash

* Update tests
2017-06-03 09:40:13 +02:00
Rhys Arkins 07ad13337b Add GitHub App support ()
* Add jsonwebtoken

* Add githubApp option

* Add id and key configs

* Add integer parsing to cli and env

* Remove boolean app enablement

* Drop got

* Add API functions for GitHub Apps

* debug not verbose in api

* Add GitHub App Helper

* Update redact function

* Add GitHub app logic

* Update logging

* Fix lint

* getInstallations tests

* getInstallationToken tests

* getInstallationRepositories tests

* Refactor ghGot structure

* Add github app tests

* Add config tests

* update lockfile
2017-06-02 22:06:15 +02:00
Rhys Arkins 44e7bbf512 Use es5 trailing commas () 2017-04-21 10:25:49 +02:00
Rhys Arkins 06f8d50f5e Use Prettier () 2017-04-21 10:12:41 +02:00
Rhys Arkins 97d2a54561 Add repository autodiscovery ()
Closes 
2017-04-21 07:00:26 +02:00
Rhys Arkins aa3309ffe1 PR Automerging ()
Closes 

* Add automerge definition

* Add mergeMethod

* add mergePr for GitHub

* update definitions

* autodetect merge type

* Check mergeable state

* Don’t split majors if automerging any

* Update mergePr api commands

* fix initRepo tests

* Add tests

* Fix mergePr call

* Fix description

* Revert branchWorker changes

* revert comment

* Add test

* Add major/minor separation tests

* Add status-success tests

* Add not-pending tests

* Add automerge tests

* Check branch status before merge
2017-04-20 13:01:23 +02:00
Rhys Arkins d3023dcb26 Add tests 2017-04-20 07:09:07 +02:00
Rhys Arkins 8113a19b1f Fix GitHub branchExists check ()
* Fix: don’t check for closed PR if groupName is configured

* Fix GitHub branchExists check

* Revert "Fix GitHub branchExists check"

This reverts commit 775b3172f1.

* Revert "Revert "Fix GitHub branchExists check""

This reverts commit 84e4a5dbbf.

* Update tests
2017-04-17 08:39:11 +02:00
Rhys Arkins 54eaacebe3 Enhance logic for PR rebase check (GitHub) ()
* Enhance logic for PR rebase check (GitHub)

Closes 

* don’t set false

* update snapshots

* Update tests
2017-03-13 10:05:19 +01:00
Renovate Bot e0e4c7be9f Update dependency jest to version 19.x ()
* Update dependency jest to version 19.0.0

* Update jest snapshot
2017-02-21 11:50:35 +01:00