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