Skip to content

Commit c6271b9

Browse files
authored
feat(renovate): add Renovate configuration if owner is 'octokit' (#193)
1 parent 966a279 commit c6271b9

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const createReadme = require("./lib/create-readme");
1818
const createReleaseAction = require("./lib/create-release-action");
1919
const createUpdatePrettierAction = require("./lib/create-update-prettier-action");
2020
const createTestAction = require("./lib/create-test-action");
21+
const createRenovateConfig = require("./lib/create-renovate-config");
2122
const createRepository = require("./lib/create-repository");
2223
const inviteCollaborators = require("./lib/invite-collaborators");
2324
const prompts = require("./lib/prompts");
@@ -460,6 +461,13 @@ module.exportst = async function main() {
460461
await command(`git add .github/workflows/update-prettier.yml`);
461462
await command(`git commit -m 'ci(update-prettier): initial version'`);
462463

464+
if (owner === "octokit") {
465+
console.log("Create Renovate configuration");
466+
await createRenovateConfig();
467+
await command(`git add .github/renovate.json`);
468+
await command(`git commit -m 'ci(renovate): add Renovate configuration'`);
469+
}
470+
463471
await command(`git push`);
464472

465473
console.log(`Your new repository is here:

lib/create-renovate-config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = createRenovateConfig;
2+
3+
const writePrettyFile = require("./write-pretty-file");
4+
5+
const config = {
6+
extends: ["github>octokit/.github"],
7+
};
8+
9+
async function createRenovateConfig() {
10+
await writePrettyFile(".github/renovate.json", JSON.stringify(config));
11+
}

0 commit comments

Comments
 (0)