Commit graph

330 commits

Author SHA1 Message Date
Rhys Arkins
f63a882cc7 logs: trace getFile 2018-05-16 06:37:01 +02:00
Rhys Arkins
fc203bcc89 refactor(github): do not retry 401 Bad Credentials 2018-05-16 06:04:55 +02:00
Rhys Arkins
0fa499cd66 fix: getPr canRebase calculation
Closes #1961
2018-05-13 14:36:56 +02:00
Rhys Arkins
37874127db fix: return null for large files off master 2018-05-12 06:32:30 +02:00
Rhys Arkins
a8a3197629 fix(github): check pull request reviews before merging 2018-05-12 06:17:24 +02:00
Rhys Arkins
5dfe14b71c logs: less getPrList 2018-05-09 18:44:41 +02:00
Rhys Arkins
9e47738e8e fix: don’t attempt automerge if push protection enabled (github) 2018-05-09 08:53:57 +02:00
Rhys Arkins
ecdcd9df4f
feat: refactor dependency extraction (#1912)
Rewrite of dependency extraction, particularly for npm. Paves way for easier addition of new package managers.

Closes #1882
2018-05-09 08:03:59 +02:00
Rhys Arkins
1762ee68a0
feat: automergeComment (#1906)
Adds new option “pr-comment” for `automergeType` and a new option `automergeComment` to use in such a case.
2018-05-04 06:55:01 +02:00
Rhys Arkins
45dc236e40 fix: log request options with when errored 2018-05-03 19:18:53 +02:00
Rhys Arkins
6415833a4b refactor: renovateapp.com -> renovatebot.com 2018-04-24 13:59:42 +02:00
Rhys Arkins
6eb5fe787b fix: typo in large file tree url 2018-04-19 09:09:27 +02:00
Rhys Arkins
1564150d9f refactor: streamline debug logging 2018-04-18 21:19:00 +02:00
renovate[bot]
106375295e chore: update dependency prettier to v1.12.1 (#1841) 2018-04-17 08:29:55 +02:00
Sarun Intaralawan
776e516e83 feat: implement isBranchStale for GitLab (#1833)
Closes #1626
2018-04-14 21:47:22 +02:00
Rhys Arkins
5a6be0f9b2 fix: keep trying automerge if receiving a 405
GitHub forbids rebase merging if signed commits branch protection is enabled. We still want to try rebase first though, so will keep trying.
2018-04-11 10:39:12 +02:00
Rhys Arkins
f634812636 logs: improve merge status/result debug 2018-04-11 09:39:35 +02:00
Rhys Arkins
2dd588df06 fix: branch status check typo 2018-04-11 09:39:08 +02:00
Ayoub Kaanich
ec7f75cfe9 refactor: use delay for gh-got wrapper 2018-04-09 06:07:48 +02:00
Adam Moss
51c1efa7a8 fix(gitlab-reviewer): change from error to warning (#1803)
GitLab as of v10.6 has a API end point for Merge Request Approvals
which equates to the Reviewer functionality in GitHub.  This is available
to both GitLab.com and EES or above on-prem users.

See https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-approvals

Signed-off-by: Adam Moss <adam.moss@bcs.org.uk>
2018-04-06 11:31:34 +02:00
Rhys Arkins
b6cf7360e2
fix: clean repo at end of every repo run (#1787)
Closes #1786
2018-04-04 14:16:36 +02:00
Rhys Arkins
96275379a7 logs: Autodiscovering 2018-04-04 13:38:06 +02:00
Steven Hargrove
24c324c5b6 refactor: initPlatform 2018-04-04 13:33:56 +02:00
Rhys Arkins
c78da83798 logs: debug log fileList length when retrieving 2018-04-04 07:18:01 +02:00
Rhys Arkins
ba98e7dc3e fix(github): don’t post branch status check if already set
Closes #1779
2018-04-03 06:51:19 +02:00
Ayoub Kaanich
3b8f3c5c16 fix: use sha instead of ref for PRs when possible. (#1772)
Resolves #1658
2018-04-02 22:49:34 +02:00
Rhys Arkins
61e4de2745 fix: check that result body is an array for getIssueList() 2018-04-02 18:46:45 +02:00
Rhys Arkins
6edb5fd579 fix: cache github requests that include a host prefix
We were only caching GET requests that start with `repos/` and so this skipped URLs requested by our release-notes (CHANGELOG.md) function.
2018-03-30 13:37:06 +02:00
Rhys Arkins
c4d8c36fd6 logs: log github requests only if non-cached 2018-03-30 13:33:37 +02:00
Rhys Arkins
6eea2e63d3 logs: info only if issues are disabled 2018-03-29 14:16:39 +02:00
Rhys Arkins
d9c1521f73 fix: delete blocking branch before attempting create 2018-03-28 16:08:07 +02:00
Rhys Arkins
171cdf372b fix: add option for unlimited pagination
Set env variable RENOVATE_PAGINATE_ALL to disable Renovate’s regular limiting of 1000 results (unlimited results will be returned).
2018-03-28 06:04:44 +02:00
Rhys Arkins
9ab4e55bc5 chore: reduce logger.debug volume 2018-03-27 21:57:02 +02:00
Rhys Arkins
4c3581caf0 fix: prune “renovate” branch if branchPrefix is “renovate/“
Otherwise it blocks us from branch creation
2018-03-26 12:10:00 +02:00
Rhys Arkins
ddca468cc7 fix: github branch warm 2018-03-25 21:25:02 +02:00
Rhys Arkins
cc180018be fix: fetch branch commit early
Fetches the base branch commit SHA during initRepo so that it can be cached. This should prevent us creating branches off a commit later than the one we fetched files for.

Fixes #1712
2018-03-24 06:33:05 +01:00
Rhys Arkins
445cdbe3eb fix: loosen branch delete not exist check 2018-03-22 12:20:07 +01:00
Rhys Arkins
0462f91e7a fix: expand github errors for better debugging
Try to get message and body in all errors we log
2018-03-22 09:51:19 +01:00
Rhys Arkins
363a2cc2e5 fix: abort renovation if rate limit exceeded (github) 2018-03-22 09:26:20 +01:00
Rhys Arkins
967529104d fix: add try/catch to branch delete (github) 2018-03-21 13:46:58 +01:00
Rhys Arkins
2ba360f6b3 chore: add sourceRepo to prList (github) 2018-03-21 09:14:48 +01:00
Rhys Arkins
60c997f180 chore: refactor delete to null 2018-03-21 09:10:53 +01:00
Rhys Arkins
d5903b720f chore: fix prettier 2018-03-18 10:05:47 +01:00
Rhys Arkins
b8105c2e9d fix: encodeURI filePath in getFile (github) 2018-03-18 08:42:04 +01:00
Rhys Arkins
f70c1fe749 fix: move mirrorMode branch creation into initRepo 2018-03-18 07:04:56 +01:00
Rhys Arkins
4121350eaa fix: use renovate-config as onboarding base branch for mirror mode 2018-03-18 06:46:01 +01:00
Rhys Arkins
159a0efc90 fix: retrieve baseCommitSha before comparing in mirrorMode 2018-03-17 07:16:56 +01:00
Rhys Arkins
ef26fdb3fe fix: mirrorMode fork patching
When in mirrorMode, Renovate should keep its fork up to date
2018-03-17 06:37:42 +01:00
Rhys Arkins
ec14bf0e92
fix: reopen MR after branch deletion (GitLab) (#1660)
Closes #1657
2018-03-13 20:33:22 +01:00
Rhys Arkins
c2f0a46d9a feat: npm shrinkwrap
Adds support for npm-shrinkwrap.json files.

Closes #67
2018-03-08 09:46:08 +01:00
Rhys Arkins
a186a4b091 chore: downgrade PR log to debug 2018-03-06 19:31:02 +01:00
Rhys Arkins
453ce13278 fix: Revert "refactor: array concatenation (#1601)"
This reverts commit dd26a018c5.
2018-03-06 15:54:39 +01:00
AndreiMargineanu
dd26a018c5 refactor: array concatenation (#1601)
Refactors all instances of .concat() to use array spread operators instead

Closes #1459
2018-03-06 12:34:39 +01:00
Rhys Arkins
4104e81005 Revert "chore: remove unused getPrFiles functions"
This reverts commit d5984a3cad.
2018-03-06 12:18:35 +01:00
Adam Moss
621badb964 fix(allow-failure): enabled automerge when allowed failures occur
Closes: #1586

Signed-off-by: Adam Moss <adam.moss@bcs.org.uk>
2018-03-05 21:18:51 +01:00
Rhys Arkins
d5984a3cad chore: remove unused getPrFiles functions 2018-03-05 15:50:34 +01:00
Rhys Arkins
e47766c0f4 fix: add try/catch to getAllRenovateBranches 2018-03-01 21:17:41 +01:00
Rhys Arkins
4f642d5a95 fix: optimise getAllRenovateBrnahces
Supply prefix in query and paginate.
2018-03-01 21:15:17 +01:00
Rhys Arkins
9119568fe4 fix: add checks if pr branch still exists (gitlab)
in GitLab, a PR may be open while the branch itself has been removed. We cant just assume that the branch exists because the PR does, even if it’s an edge case.
2018-02-28 04:43:30 +01:00
Rhys Arkins
d0fa221ae3 fix: only rebase if pr is dirty (github) 2018-02-27 19:50:16 +01:00
Rhys Arkins
11c3ce7674 refactor: skip logging lock files when commit files 2018-02-21 08:28:02 +01:00
Rhys Arkins
d258c3849e refactor: log files if commit files to branch fails 2018-02-21 06:52:56 +01:00
Rhys Arkins
8463be0266 fix: return branchName field when creating pr 2018-02-19 21:30:33 +01:00
Rhys Arkins
c949778ab7 fix: harmonize to pr.branchName 2018-02-19 20:01:10 +01:00
JYC
e03d487bc8 fix: update dependency vso-node-api to v6.3.2 (#1534)
* fix: update dependency vso-node-api to v6.3.2

* The web api create methods need to be async

* remove Redundant use of `await`

* To test 100%
2018-02-19 14:17:53 +01:00
Rhys Arkins
9872096948 fix: log request headers when failing to create branch 2018-02-19 07:11:28 +01:00
Rhys Arkins
ff54e0d626 fix: log err.response when failing to create branch 2018-02-18 19:50:12 +01:00
Rhys Arkins
776755c1ba fix: try updating branch if creating branch fails 2018-02-18 08:28:30 +01:00
Rhys Arkins
f4f3d57d3a refactor: debug branchList retrieval 2018-02-17 08:13:19 +01:00
Rhys Arkins
fe479166a1 fix: improve branch creation failure logging 2018-02-17 08:09:32 +01:00
Rhys Arkins
576f38efdc fix: use isUmergeable instead of mergeable 2018-02-16 16:19:26 +01:00
Adam Moss
4c0d7cf3e6 fix(gitAuthor): add support for GitLab
Allow the `gitAuthor` configuration option to override the committer
property when creating or updating a file within GitLab.  Port of #1280
which introduced the same capability for GitHub.

Closes #1281

Signed-off-by: Adam Moss <adam.moss@bcs.org.uk>
2018-02-12 16:49:08 +01:00
Rhys Arkins
9c845040ac fix: delete gitlab branch first if rebasing 2018-02-12 06:58:33 +01:00
Rhys Arkins
c92d67658c feat: use gitlab commits api for 1 commit per branch
Closes #1508
2018-02-12 06:20:20 +01:00
Rhys Arkins
b1ad1bb058 fix: detect renamed repositories and skip 2018-02-08 16:04:25 +01:00
Rhys Arkins
3cf550069e fix: check only for 422 when catching branch update error (github) 2018-02-08 10:04:33 +01:00
Rhys Arkins
84fe4f2dff chore: lower getFile 404 warn to info 2018-02-07 16:23:00 +01:00
Rhys Arkins
a512b416eb fix: use parent repo for assignees and labels when in fork mode 2018-02-07 12:26:13 +01:00
Rhys Arkins
da7ad5b342 chore: downgrade cached result log to trace 2018-02-06 14:17:46 +01:00
Rhys Arkins
a79222b777 fix: catch initRepo 403 (github) 2018-02-05 22:23:50 +01:00
Rhys Arkins
5dea3f7150 fix: check initRepo res before logging res.body 2018-02-05 22:10:12 +01:00
Rhys Arkins
28371c667d fix: catch blocked repositories properly 2018-02-05 18:38:07 +01:00
Rhys Arkins
f416f4b927 fix: don’t check statusCode for blocked 2018-02-05 14:34:46 +01:00
Rhys Arkins
efa754cbc6 fix: add try/catch to ensureIssue (github) 2018-02-04 22:24:38 +01:00
Rhys Arkins
5dda1eedf9 fix: limit paginated results to 1000 2018-02-04 22:24:20 +01:00
Rhys Arkins
2389cf3f9e fix: better retries log in github wrapper 2018-02-04 22:22:13 +01:00
Rhys Arkins
4c267b210b fix: handle archived repos gracefully 2018-02-04 21:20:28 +01:00
Rhys Arkins
e306f707db fix: abort renovation if repository has changed during run
If attempting to create a branch and it already exists, or attempting to update a branch and it no longer exists, then we abort.
2018-02-03 15:45:43 +01:00
Rhys Arkins
42178e72c9 fix: catch errors creating branches and try update instead (github) 2018-02-03 13:54:42 +01:00
Rhys Arkins
144ce72311 refactor: add better debugging to branch creation (github) 2018-02-03 13:39:16 +01:00
Rhys Arkins
720b46696a
feat: gitlab branch cleanup (#1475)
Removes the GitHub-only check when cleaning/pruning branches.
2018-02-03 12:06:25 +01:00
Rhys Arkins
aa0b0d68fd
fix: don’t check for branch existing when rebasing (gitlab) (#1474)
Previously, our GitLab API library was checking if a a branch existed first before trying to create it. But due to caching, a branch we'd deleted ourselves still showed up as existing, so then there was no branch to update the files in. Skip this check and use try/catch for creating branch instead.

Fixes #1468
2018-02-03 11:04:27 +01:00
Rhys Arkins
6101f25dc7 fix: reset file list when setting base branch (gitlab) 2018-02-03 10:39:04 +01:00
Rhys Arkins
b184d3a217 fix: handle 403 blocked from github 2018-02-02 18:04:41 +01:00
Rhys Arkins
d66dea7ec3
feat: verify status check (GitHub) (#1444)
Adds a `renovate/verify` status check for those migrating and looking for familiarity. Better to check the GPG verified commit, as mentioned in the associated doc.
2018-01-25 13:36:21 +01:00
Rhys Arkins
9363fd8acf refactor: pass object to platform.initRepo
Also renames repoName to repository
2018-01-25 12:24:13 +01:00
Rhys Arkins
bc6d74e0de refactor: move github init deletions later 2018-01-24 19:18:03 +01:00
Rhys Arkins
5c01f59b7e refactor: limit github pagination to 1000 total 2018-01-19 15:28:54 +01:00
Rhys Arkins
3e1d8474a9 refactor: always debug log github get requests 2018-01-19 12:00:26 +01:00
Rhys Arkins
285a59b085
fix: filter out “Update branch” commits when determining canRebase (#1410)
Closes #1405
2018-01-19 07:35:39 +01:00
Rhys Arkins
dddf402c1c chore: fix lint 2018-01-18 21:59:11 +01:00
Rhys Arkins
0a9143c9f3
fix: move archived log to correct place 2018-01-18 18:32:08 +01:00
Rhys Arkins
284eedc926 refactor: improve github.initRepo structure and comments 2018-01-17 15:25:32 +01:00
Rhys Arkins
eb2c159d02 refactor: simplify archived check 2018-01-17 15:16:52 +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
Rhys Arkins
421adcfedc fix: use author first and then committer when checking pr
Lets author take precedence over committer, in case users edit PRs and commit Renovate’s commit back themselves.

Fixes #1364
2018-01-10 12:43:53 +01:00
Rhys Arkins
67eb60fb4f fix: forking mode should add/edit/delete comments in parent repo 2018-01-10 07:25:56 +01:00
Rhys Arkins
0a1b905b0e fix: forking mode should check commits on parent repo 2018-01-08 22:00:47 +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
007be13313
feat: add api caching to gitlab (#1324)
This PR ports across GitHub’s caching approach to the GitLab platform API.
2017-12-23 08:03:16 +01:00
Rhys Arkins
a8cceaa63e chore: fix Closing issue log location 2017-12-22 19:09:16 +01:00
Rhys Arkins
464ebc4277 fix: close issue with number, not id 2017-12-18 13:35:30 +01:00
Rhys Arkins
f351480f18 fix: create issue in parent repo when in forkMode 2017-12-18 10:29:46 +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
a61ee0b3ef refactor: log info message when do not have branch protection permissions 2017-12-16 06:33:18 +01:00
Rhys Arkins
35cd3506db fix: drop team_reviewers param and github preview header from reviewer requests 2017-12-15 19:51:41 +01:00
Rhys Arkins
242e2e34c6 fix: query parent repo for issue comments if forking 2017-12-14 21:39:23 +01:00
Rhys Arkins
c58498a9a9 fix: use forkToken when creating or updating PR 2017-12-14 12:11:30 +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
2a77124069 chore: don’t debug prList 2017-12-14 09:46:31 +01:00
Rhys Arkins
f5c3642ae7
fix: escape all forward slash with %2f (gitlab) (#1294)
Use a regex replace all instead of single replace, for cases where projects or branches have more than one forward slash.

Fixes #1293
2017-12-14 06:19:24 +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
837b53619f
fix: use git data API to retrieve large files (#1286) 2017-12-11 12:24:37 +01:00
Rhys Arkins
967e4dd1c4 refactor: remove status checks basic message 2017-12-10 17:57:20 +01:00
Rhys Arkins
ce83c86fa2 refactor: rename branch protection messages 2017-12-10 17:55:23 +01:00
Rhys Arkins
a5c47e082a refactor: consistency of branch protection logging 2017-12-10 15:58:00 +01:00
Rhys Arkins
aebd63eebe refactor: use consistent log messages for branch protection 2017-12-10 15:38:47 +01:00
Rhys Arkins
278e9fe14a
refactor: improve branch protection visibility (github) (#1284) 2017-12-10 15:22:58 +01:00
Rhys Arkins
0dbd4c3ac0
fix: remove unnecessary loki preview header for repo object (#1283)
The loki preview header is no longer required, as per https://developer.github.com/changes/2017-09-06-protected-branches-preview-end/
2017-12-10 07:25:36 +01:00
Rhys Arkins
5036360658
feat: gitPrivateKey for signed git commits (#1282)
This feature enables signing of git commits on GitHub. To achieve this, Renovate must be configured with a gitPrivateKey in format supported by openpgp. There must also be a gitAuthor configured to enable this feature.

Closes #897
2017-12-09 17:56:23 +01:00
Rhys Arkins
70c95add5a
feat: custom git commit author (#1280)
This PR adds the capability to specify a custom author for git commits on GitHub. Setting this field will mean GitHub uses this value for author and commit instead of the token’s identity. For instance if you are running hosted mode you may set the gitAuthor to “Renovate Bot <bot@renovate.com>” to have commits appear as coming from the renovate-bot account.
2017-12-09 17:09:31 +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
ed99d0b2de refactor: handle mergePr 405 errors specially 2017-12-05 06:43:23 +01:00
JYC
560bf727c3 fix: VSTS - add reviewer once even if multiple teams (#1259)
Closes #1258
2017-12-02 20:22:03 +01:00
Rhys Arkins
bd52d7f1b1
fix: delete pr list before first get (#1253)
This shouldn’t be necessary because we already `config = {};` during the init. But somehow `if (!config.prList)` is returning false sometimes.
2017-11-28 20:29:42 +01:00
Rhys Arkins
95a28bae2e
refactor: increase getPrList logging for GitHub (#1251) 2017-11-28 16:50:56 +01:00
Rhys Arkins
cfcea0dbb3
fix: improve pr merged detection logic (#1248)
Make sure PR is closed and merged_at is a non-zero length string.

Helps #1247
2017-11-28 13:27:37 +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
7675f3a9f1
fix: replace singapore/renovate references with renovateapp/renovate (#1229) 2017-11-23 14:08:31 +01:00
JYC
8e1dfa111c feat: VSTS - Add Reviewers & Assignees (#1200) 2017-11-22 05:12:19 +01:00
JYC
4bce262a14 fix: VSTS - Fix reading big file (#1204)
Closes #1158 

* deleteBranch like gitlab

* changes in single commit

* prettier lint and tests

* read big file

* challenging linting!
2017-11-21 06:08:54 +01:00
Hutson Betts
ca3a1c9f9d fix(github): paginate repo get requests (#1193)
Enable pagainate for requests made to the `user/repos` endpoint
for fetching all repositories the configured user has access to.
2017-11-20 20:36:40 +01:00
JYC
dbe68efdc7 fix: VSTS - RepoName & ProjectName (#1201)
* deleteBranch like gitlab

* changes in single commit

* prettier lint and tests

* add project and repo feature

* add case insensitive string compare
2017-11-20 19:47:49 +01:00
JYC
b272b4aab7 fix: VSTS - canRebase (#1197)
* deleteBranch like gitlab

* changes in single commit

* prettier lint and tests
2017-11-19 11:23:30 +01:00
Rhys Arkins
e27a1b486c
refactor: use simpler api for branchExists (#1187)
simpler api + cacheable
2017-11-16 22:40:07 +01:00
Rhys Arkins
fd10299a71
feat: cache github get requests in memory (#1185)
The existing github wrapper is now extended to cache any get request. The existing pr cache is removed as it is now redundant.
2017-11-16 22:13:54 +01:00
Rhys Arkins
319b790c9c
refactor: debug github api calls (#1183) 2017-11-16 19:27:59 +01:00
Rhys Arkins
e89ef0ddb8 chore: add debugging to findPr and getPrList 2017-11-16 14:16:24 +01:00
Rhys Arkins
bf0cbd38cb refactor: reset platform config to {} during initRepo 2017-11-16 14:16:24 +01:00
Rhys Arkins
d9db675b68 fix: reset base commit during init (#1179) 2017-11-16 13:51:26 +01:00
Rhys Arkins
6dfeebba32
refactor: base commit sha logic and logging (#1178) 2017-11-16 13:37:36 +01:00
Rhys Arkins
15c3a9a8be
refactor: use fileList to speed up getFile 404s (#1175) 2017-11-16 07:13:50 +01:00
Rhys Arkins
3921c4007d
refactor: cache pull requests (github) (#1174) 2017-11-15 15:39:39 +01:00
Rhys Arkins
c89b957b8a
refactor: defer branch protection check (#1173) 2017-11-15 15:31:20 +01:00
Rhys Arkins
feb1f4e3fd
fix: move github 409 catch after refactor (#1172) 2017-11-15 14:41:36 +01:00
Rhys Arkins
0e68e4aa50
refactor: defer getBaseCommitSHA until needed (#1171) 2017-11-15 14:20:17 +01:00
Manuel Rueda
a19421fff6 fix: normalize GitLab findPr with GitHub and add PR cache (#1165)
Closes #1164
2017-11-14 09:55:05 +01:00
Rhys Arkins
d9974a8994
refactor: drop unused isClosed from github and gitlab (#1166) 2017-11-14 09:24:19 +01:00
JYC
c9335d5bf6 Add VSTS support (#1049)
This PR adds support for Microsoft's [Visual Studio Team Services](https://www.visualstudio.com/team-services/) platform (in addition to existing GitHub and GitLab support). 

Closes #571
2017-11-12 10:26:53 +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
e9bf2a26e1
fix: check commit message before ignoring web-flow commits (#1138) 2017-11-10 13:00:18 +01:00
Rhys Arkins
f78b52d235
fix: use assignee_id when adding assignees in gitlab (#1136)
GitLab’s API requires assignee *id* and not *username* when adding assignees to a merge request. Now, we allow Renovate users to still configure usernames and we will look up the ID and use it in the request instead.

Closes #1131
2017-11-10 09:59:12 +01:00
Rhys Arkins
f9e9351409
fix: use gitlab iid consistently in all pr-related functions (#1135) 2017-11-10 09:29:24 +01:00
Rhys Arkins
793c2c95bd
fix: basBranch typo in gitlab api (#1128) 2017-11-09 15:30:00 +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
00e7821fcb
feat: use mostly markdown for pr bodies (#1118)
Existing solution uses HTML bodies for PR descriptions, as that was the easiest way to get consistency between GitHub and GitLab. However, VSTS supports only markdown so we needed to refactor how this is done. Now, GitHub PR bodies uses only minimal HTML (for summary/details) while GitLab PR bodies are converted to HTML using GitHub flavoured markdown for maximum compatibility. VSTS will be able to strip out the minimal markdown.

Closes #1018
2017-11-08 11:09:26 +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
Rhys Arkins
edfca74ede
refactor: make common platform public API (#1104)
Refactors file system of platforms and adds test to ensure GitHub and GitLab have same module.exports signatures.
2017-11-05 08:18:20 +01:00
Rhys Arkins
d5462049a6
chore: implement require-await eslint rule (#1095) 2017-11-03 11:56:25 +01:00
Rhys Arkins
90c3b1cdbd
fix: add gitlab MR labels at time of creation (#1006)
This refactor means that createPr now takes `labels` as a new parameter so that the GitLab API can include them with the MR creation request, so save one API call. This also fixes #985 as a result.
2017-11-01 13:55:36 +01:00
Rhys Arkins
1fb8369804 feat: deprecate gitlab apiv3 (#1064)
GitLab is now hardcoded to apiv4 with no detection performed.

BREAKING CHANGE: GitLab API v3 is no longer supported
2017-11-01 13:13:55 +01:00
Rhys Arkins
af75504e20 feat: deprecate github app (#1068)
BREAKING CHANGE: GitHub *App* support code has been removed from within this repository.
2017-11-01 13:13:55 +01:00
Rhys Arkins
ea8854f8e3
refactor: add logging for github branch status checks (#1073)
Helps with troubleshooting #1072
2017-11-01 13:03:16 +01:00
Rhys Arkins
7d06bebe2e refactor: push detect dockerfiles to manager (#1043)
* refactor platform

* refactor detect package files

* fix

* refactor npm detect

* refactor meteor detect

* refactor: move detect package files completely to manager

* update snapshots
2017-10-25 06:00:07 +02:00
Rhys Arkins
01fedc7e0c refactor: move github and gitlab api to platform (#1037) 2017-10-24 10:27:17 +02:00