From eab997bf6e6c30e75480b2b625b44ee18954750b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=9Aurcanu=20Dragomir?= <dragomirt22@gmail.com> Date: Mon, 7 May 2018 13:57:31 +0300 Subject: [PATCH] docs: add self-hosted config documentation and lint (#1921) --- test/website-docs.spec.js | 19 +++++++++ website/docs/self-hosted-configuration.md | 50 +++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 website/docs/self-hosted-configuration.md diff --git a/test/website-docs.spec.js b/test/website-docs.spec.js index 9c481cb270..436744f774 100644 --- a/test/website-docs.spec.js +++ b/test/website-docs.spec.js @@ -3,21 +3,40 @@ const options = require('../lib/config/definitions').getOptions(); describe('docs', () => { const doc = fs.readFileSync('website/docs/configuration-options.md', 'utf8'); + const selfHostDoc = fs.readFileSync( + 'website/docs/self-hosted-configuration.md', + 'utf8' + ); const headers = doc .match(/\n## (.*?)\n/g) .map(match => match.substring(4, match.length - 1)); + const selfHostHeaders = selfHostDoc + .match(/\n## (.*?)\n/g) + .map(match => match.substring(4, match.length - 1)); const expectedOptions = options .filter(option => option.stage !== 'global') .filter(option => !option.admin) .filter(option => !option.parent) .map(option => option.name) .sort(); + + const selfHostExpectedOptions = options + .filter(option => option.admin || option.stage === 'global') + .map(option => option.name) + .sort(); + it('has doc headers sorted alphabetically', () => { expect(headers).toEqual([...headers].sort()); }); it('has headers for every required option', () => { expect(headers).toEqual(expectedOptions); }); + it('has self hosted doc headers sorted alphabetically', () => { + expect(selfHostHeaders).toEqual([...selfHostHeaders].sort()); + }); + it('has headers (self hosted) for every required option', () => { + expect(selfHostHeaders).toEqual(selfHostExpectedOptions); + }); const headers3 = doc .match(/\n### (.*?)\n/g) .map(match => match.substring(5, match.length - 1)); diff --git a/website/docs/self-hosted-configuration.md b/website/docs/self-hosted-configuration.md new file mode 100644 index 0000000000..8507f41de0 --- /dev/null +++ b/website/docs/self-hosted-configuration.md @@ -0,0 +1,50 @@ +--- +title: Self-Hosted Configuration +description: Self-Hosted Configuration usable in renovate.json or package.json +--- + +# Self-Hosted Configuration Options + +The below configuration options are applicable only if you are running your own instance ("bot") of Renovate. + +## autodiscover + +Be cautious when using this option - it will run Renovate over _every_ repository that the bot account has access to. + +## endpoint + +## exposeEnv + +## forkMode + +You probably have no need for this option - it is an experimental setting for the Renovate hosted GitHub App. + +## gitPrivateKey + +## logFile + +## logFileLevel + +## logLevel + +## mirrorMode + +You probably have no need for this option - it is an experimental setting for the Renovate hosted GitHub App. + +## onboarding + +Set this to `false` if (a) you configure Renovate entirely on the bot side (i.e. empty `renovate.json` in repositories) and (b) you wish to run Renovate on every repository the bot has access to, and (c) you wish to skip the onboarding PRs. + +## onboardingConfig + +## platform + +## prFooter + +## privateKey + +## repositories + +## requireConfig + +## token -- GitLab