diff --git a/index.js b/index.js index 05cbf0a1b..891f5928f 100644 --- a/index.js +++ b/index.js @@ -18,6 +18,7 @@ const createReadme = require("./lib/create-readme"); const createReleaseAction = require("./lib/create-release-action"); const createUpdatePrettierAction = require("./lib/create-update-prettier-action"); const createTestAction = require("./lib/create-test-action"); +const createRenovateConfig = require("./lib/create-renovate-config"); const createRepository = require("./lib/create-repository"); const inviteCollaborators = require("./lib/invite-collaborators"); const prompts = require("./lib/prompts"); @@ -460,6 +461,13 @@ module.exportst = async function main() { await command(`git add .github/workflows/update-prettier.yml`); await command(`git commit -m 'ci(update-prettier): initial version'`); + if (owner === "octokit") { + console.log("Create Renovate configuration"); + await createRenovateConfig(); + await command(`git add .github/renovate.json`); + await command(`git commit -m 'ci(renovate): add Renovate configuration'`); + } + await command(`git push`); console.log(`Your new repository is here: diff --git a/lib/create-renovate-config.js b/lib/create-renovate-config.js new file mode 100644 index 000000000..fb98432c9 --- /dev/null +++ b/lib/create-renovate-config.js @@ -0,0 +1,11 @@ +module.exports = createRenovateConfig; + +const writePrettyFile = require("./write-pretty-file"); + +const config = { + extends: ["github>octokit/.github"], +}; + +async function createRenovateConfig() { + await writePrettyFile(".github/renovate.json", JSON.stringify(config)); +}