Commit Graph

166 Commits (v9.92.0)

Author SHA1 Message Date
Rhys Arkins a0f773aa3c feat: retry github 401 bad credentials responses ()
Closes 
2017-10-20 06:24:09 +02:00
Rhys Arkins 709a8c20ba refactor: log res if github initRepo fails () 2017-10-19 20:45:25 +02:00
Rhys Arkins 48f2b5a2e1 fix: add check for base before comparing sha () 2017-10-19 17:29:12 +02:00
Paul Reichelt 36b11c530f Fix: filepath encoding for gitlab createFile and updateFile ()
Relates to  and 

Auto detected file names are not encoded correctly so here's a fix for that.
2017-10-19 14:10:20 +02:00
Rhys Arkins e8810b33fa feat: add ensure comment removal api (github) () 2017-10-19 13:30:26 +02:00
Rhys Arkins fa48a7fdef feat: rename open prs before autoclosing ()
This is a failsafe against Renovate bugs and potentially also mistakes on the user’s part. Before deleting/pruning any branches, Renovate will rename the PR’s title so that it should not block future PRs.

Closes 
2017-10-19 07:36:09 +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 3841f29bd4 fix: request 100 results per page (gitlab) () 2017-10-17 21:57:51 +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 a84bc2c3ed feat: workaround gitlab hyperlinking bug ()
Add space before closing `</h4>` to prevent unintential hyperlinking on GitLab.

Closes 
2017-10-17 14:37:57 +02:00
Rhys Arkins 2b6077b6f6 fix: make github pagination opt-in () 2017-10-17 13:45:17 +02:00
Rhys Arkins 43e03a3b74 fix: recursive=true not 1 (gitlab) () 2017-10-17 12:34:51 +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 0560506cd4 chore: downgrade npm getDependnecy ebug to log () 2017-10-12 10:16:33 +02:00
Rhys Arkins e9ee8002df fix: revert docker/meteor onboarding code ()
* Revert "feat: support docker and meteor onboarding without npm"

This reverts commit 437145b901.

# Conflicts:
#	test/workers/repository/onboarding.spec.js

* chore: downgrade npm cache message from debug to trace
2017-10-11 19:25:25 +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 1696244ca0 feat: warn in onboarding if package.json missing or failed to parse ()
* chore: downgrade json parsing warning from warn to debug

* feat: warn in onboarding if package.json missing or failed to parse

Closes 
2017-10-11 14:38:40 +02:00
Rhys Arkins 88f9bb40f7 fix: downgrade github branch merge api error to warn () 2017-10-05 10:45:08 +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 83ec9341de feat: npm cache expiry ()
* use keyv for cache

* set expiry to 5 minutes

Closes 
2017-10-03 10:39:03 +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
singapore 97ee1d7588 chore: downgrade "all merge attempts failed" from warn to info 2017-09-28 15:03:21 +02:00
Rhys Arkins 7208488402 fix: log when automerging succeeds () 2017-09-24 16:34:34 +02:00
Rhys Arkins bc18850e05 fix: use dummy time if missing from npm response () 2017-09-23 08:00:17 +02:00
Rhys Arkins 9aad365032 feat: improve logging visibility ()
* fix: add upgrade and branch timings to log

Adds timing logs for upgrade detection + branch updating stages.

Closes 

* improve request retry logging
2017-09-22 07:04:41 +02:00
Rhys Arkins 8d22bdbee3 fix: downgrade JSON parsing log from error to warn () 2017-09-19 14:58:37 +02:00
Rhys Arkins 660a208bd2 fix: retry api rate limit exceeded () 2017-09-16 06:39:04 +02:00
renovate[bot] cfc6c5ccdf fix: update dependency eslint-config-airbnb-base to v12 ()
* chore(deps): update dependency eslint-config-airbnb-base to v12.0.0

* fix lint
2017-09-15 19:46:25 +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