Commit Graph

96 Commits (v9.89.0)

Author SHA1 Message Date
Rhys Arkins e8810b33fa feat: add ensure comment removal api (github) () 2017-10-19 13:30:26 +02:00
Rhys Arkins c93c761d27 refactor: log addReviewers and add empty team reviewers ()
See if this helps 
2017-10-19 06:35:21 +02:00
Rhys Arkins e5895aeecf refactor: use findPr for getBranchPr 2017-10-19 06:26:29 +02:00
Rhys Arkins 84e368ff1f refactor: remove unused getAllPrs api (github) 2017-10-19 06:26:29 +02:00
Rhys Arkins b5870d90d9 feat: allow rebase after github web branch update ()
GitHub provides a tempting “Update branch” button whenever a branch is out of date with master, but the problem was that this then made us flag the branch as modified and hence unrebaseable, so the user would be stuck with keeping it update themselves from then on. With this feature, we ignore the “web-flow” committer when calculcating if there has been only one author.
2017-10-18 15:49:35 +02:00
Rhys Arkins f980fea6ca feat: comment in closed PR when it is blocking an update (github) ()
This feature adds a new behaviour to Renovate, where it will now add a comment to any existing closed PRs that are "blocking" currently valid updates. A new API function "ensureComment" has been added, its purpose is so we can ensure there exists only one comment with a certain subject/heading. This lets us prevent duplicates as well as update existing, without having to keep state about it. ensureComment needs porting to gitlab, but should be quite easy.
2017-10-18 15:28:51 +02:00
Rhys Arkins 7a1d08eaab fix: refactor out remaining do-while loops ()
* fix: convert prBody trimming from do-while to recursive

* fix: convert gitlab projects do-while to use pagination
2017-10-18 11:40:48 +02:00
Rhys Arkins cc2288ef31 fix: add try-catch to getFileList () 2017-10-18 08:25:42 +02:00
Rhys Arkins ffef63f47c feat: suppor gitlab api pagination ()
Adds paginated results capability for gitlab and enables it for getFileList. This should enable all files when using APIv4.

Hopeful this c-l-o-s-e-s  & 
2017-10-17 21:46:49 +02:00
Rhys Arkins 9a97a5901e feat: use parse-link-header library (github) ()
Now will work with any GitHub host, instead of just api.github.com
2017-10-17 20:44:40 +02:00
Rhys Arkins 2b6077b6f6 fix: make github pagination opt-in () 2017-10-17 13:45:17 +02:00
Rhys Arkins 78cff771af feat: retrieve and cache PR list for better performance 2017-10-17 11:09:03 +02:00
Rhys Arkins e310887f36 refactor: remove checkForClosedPr
replace with findPr
2017-10-17 11:09:03 +02:00
Rhys Arkins 08120967b3 feat: automatically paginate res.body responses () 2017-10-17 10:12:40 +02:00
Rhys Arkins c188a71081 fix: set GitHub App headers for every request () 2017-10-17 08:04:58 +02:00
Rhys Arkins e6e8b541cf refactor: rename ghGotRetry and glGot to get () 2017-10-17 07:15:01 +02:00
Rhys Arkins ee44d1c3ba feat: reimplement findFilePaths using trees ()
* refactor: replace github code search with getTree/manual search ()

Previously Renovate was using the GitHub code search API once for each filename we are looking for. Instead, we now retrieve a list of files in the repository and cache it so it can be reused for filename matches.

Closes 

* fix: use recursive=true

* fix: reset fileList for every repo (github)

* feat: implement findFilePaths on gitlab ()

* refactor: do not check manually for root package.json

* fix: reset fileList for every repo (gitlab)

* fix tests
2017-10-16 11:59:59 +02:00
Rhys Arkins 4ddd073863 feat: set github app preview header when in app mode ()
From https://developer.github.com/v3/apps/available-endpoints/:
> In order to access the API with your GitHub App, you must provide a custom media type in the `Accept` Header for your requests.
```
application/vnd.github.machine-man-preview+json
```
2017-10-16 09:45:31 +02:00
Rhys Arkins 74a590ae8e fix: revert findFilePath changes ()
* Revert "feat: implement findFilePaths on gitlab ()"

This reverts commit 2820b5eef3.

* Revert "refactor: replace github code search with getTree/manual search ()"

This reverts commit 33851a5aea.
2017-10-16 07:33:47 +02:00
Rhys Arkins 2820b5eef3 feat: implement findFilePaths on gitlab () 2017-10-15 22:50:59 +02:00
Rhys Arkins 33851a5aea refactor: replace github code search with getTree/manual search ()
Previously Renovate was using the GitHub code search API once for each filename we are looking for. Instead, we now retrieve a list of files in the repository and cache it so it can be reused for filename matches.

Closes 
2017-10-15 17:38:45 +02:00
Rhys Arkins 8ee76c99e2 fix: check for file content before converting to buffer (github) () 2017-10-13 06:14:29 +02:00
Rhys Arkins ba70f2a7c7 fix: log err headers if giving up on rate limit exceeded () 2017-10-11 15:18:50 +02:00
Rhys Arkins bb263cca60 fix: catch error in checkForClosedPr and return false (github) () 2017-10-05 09:25:45 +02:00
Rhys Arkins 5dab080ef7 fix: info message if automerge branch fails ()
* fix: info message if automerge branch fails

* fix snapshot
2017-10-04 16:52:50 +02:00
Rhys Arkins 188f50ba5f fix: use preview header when requesting reviewers (github) () 2017-10-02 06:57:13 +02:00
Rhys Arkins 4702f2ad95 fix: escape filename %2F (GitLab) ()
Fixes 
2017-09-29 09:05:36 +02:00
Rhys Arkins bc18850e05 fix: use dummy time if missing from npm response () 2017-09-23 08:00:17 +02:00
Rhys Arkins 660a208bd2 fix: retry api rate limit exceeded () 2017-09-16 06:39:04 +02:00
Rhys Arkins a88ba0d16a feat: Dockerfile digest support ()
This feature adds initial support for renovating Dockerfiles. Renovate now:
- Detects all `Dockerfile`s in repo
- Searches for `FROM x` in first non-comment line, breaks x into image, tag, digest
- Queries public Docker registry for image:tag combination to find latest digest
- Patches Dockerfile if necessary
- Creates branches/PRs as like with npm

Closes 
2017-09-14 09:31:36 +02:00
Rhys Arkins d765b34c33 feat: renovate meteor package.js dependencies ()
This feature adds support for renovating Meteor's `package.js` files. Meteor config is disabled by default so must be manually enabled to work. If enabled, Renovate uses GitHub's search API to look for any files named `package.js` that include the text `Npm.depends`. If so then the file is parsed using Regex to extract its dependencies and check them for updates.

Closes 
2017-09-12 09:33:41 +02:00
Rhys Arkins 8086a4eb79 fix: remove black-cat header from github reviewers api () 2017-09-08 11:19:59 +02:00
Rhys Arkins a1f9d7b547 fix: catch registry url error and default to npm () 2017-09-02 09:18:23 +02:00
Rhys Arkins fbf77cf6c7 fix: detect custom registry from repo npmrc ()
* remove registry-url

* replace registry-url with registry-auth-token

Fixes 
2017-09-01 13:01:05 +02:00
Rhys Arkins ddbbacb363 fix: escape gitlab branch name forward slash ()
Forward slash is replaced with %2F. It is assumed that this is backwards compatible with api v3 too.

Closes 
2017-08-31 21:06:19 +02:00
David Herges 2b73f98c58 fix: use `iid` for gitlab api v4 in findPr ()
GitLab 9.5 deprecates api v3 and `iid` must now be used for MRs
2017-08-31 18:21:40 +02:00
Rhys Arkins 5f708c2297 fix: do not restart renovation if automerging failed () 2017-08-31 07:15:53 +02:00
Rhys Arkins deac76b015 feat: support timeout for pr creation = not-pending ()
We should not leave the PR unopened forever if the branch remains in not-pending state too long. Some status checks may leave the status as “pending” instead of “failed”. Defaults to 12 hours but is configurable.

Closes 
2017-08-28 11:37:09 +02:00
Rhys Arkins 30251323dc fix: don't retry 401s () 2017-08-27 15:10:19 +02:00
Rhys Arkins cf1766b3e0 fix: always check github retries count () 2017-08-27 14:49:23 +02:00
Rhys Arkins d98130f50e fix: support pagination for file search () 2017-08-26 22:15:22 +02:00
Rhys Arkins e649d49615 fix: retry after github abuse trigger () 2017-08-19 11:46:30 +02:00
Rhys Arkins ad40f0abd8 feat: shareable preset configs ()
This PR implements eslint-inspired shareable configs. With this feature, we:
- Add new config option "extends"
  * This is an array of preset config names that the current config or preset extends/inherits from
- Add new config option "description"
  * Each preset config should include a description of its functionality that is human-readable
- Provide a set of commonly use configs called "preset defaults"
- Provide two "full" preset configs: "app" and "library"
   * Almost the same but app pins *all* version numbers while library only pins devdependencies
- Replace regular config in onboarding with one of these two presets
- Generate human-readable description of config in Onboarding PR
- Support npm for hosting configs (both scoped and non-scoped)

Closes , Closes , Closes 
2017-08-18 06:10:19 +02:00
Rhys Arkins 117316c0b1 fix: check current status check before setting ()
Fixes 
2017-08-08 23:03:52 +02:00
Rhys Arkins b369f670d6 fix: use baseBranch when branchName is null ()
Using fallback in function params only replaces if branchName is undefined but we also need to handle when it is `null`.
2017-08-07 10:51:17 +02:00
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