Commit Graph

49 Commits

Author SHA1 Message Date
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 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
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
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
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
Rhys Arkins d9974a8994 refactor: drop unused isClosed from github and gitlab (#1166) 2017-11-14 09:24:19 +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 f9e9351409 fix: use gitlab iid consistently in all pr-related functions (#1135) 2017-11-10 09:29:24 +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 8c479071fd refactor: use global logger (#1116) 2017-11-08 06:44:03 +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 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