Skip to content

Commit

Permalink
feat: add support for dependabot (#604)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed Sep 8, 2020
1 parent 33817a8 commit 80e04e9
Show file tree
Hide file tree
Showing 6 changed files with 675 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ yarn create nuxt-app <my-project>
1. Development tools
- [jsconfig.json](https://code.visualstudio.com/docs/languages/jsconfig)
- [Semantic PR](https://probot.github.io/apps/semantic-pull-requests/)
- [Dependabot (for GitHub only)](https://dependabot.com/)

## CLI Options

Expand Down
18 changes: 18 additions & 0 deletions packages/cna-template/template/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: '00:00'
open-pull-requests-limit: 99
reviewers:
- <%= gitUsername %>
assignees:
- <%= gitUsername %>
labels:
- dependencies
commit-message:
prefix: fix
prefix-development: chore
include: scope
11 changes: 10 additions & 1 deletion packages/create-nuxt-app/lib/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,19 @@ module.exports = [
type: 'checkbox',
choices: [
{ name: 'jsconfig.json (Recommended for VS Code if you\'re not using typescript)', value: 'jsconfig.json' },
{ name: 'Semantic Pull Requests', value: 'semantic-pull-requests' }
{ name: 'Semantic Pull Requests', value: 'semantic-pull-requests' },
{ name: 'Dependabot (For auto-updating dependencies, GitHub only)', value: 'dependabot' }
],
default: []
},
{
when: answers => answers.devTools.includes('dependabot'),
name: 'gitUsername',
message: 'What is your GitHub username?',
default: '{gitUser.name}',
filter: val => val.toLowerCase(),
store: true
},
{
name: 'vcs',
message: 'Version control system:',
Expand Down
6 changes: 4 additions & 2 deletions packages/create-nuxt-app/lib/saofile.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ module.exports = {
'tsconfig.json': 'language.includes("ts")',
'semantic.yml': 'devTools.includes("semantic-pull-requests")',
'_stylelint.config.js': 'linter.includes("stylelint")',
'_commitlint.config.js': 'linter.includes("commitlint")'
'_commitlint.config.js': 'linter.includes("commitlint")',
'dependabot.yml': 'devTools.includes("dependabot")'
},
templateDir
})
Expand All @@ -101,7 +102,8 @@ module.exports = {
'_jsconfig.json': 'jsconfig.json',
'_stylelint.config.js': 'stylelint.config.js',
'_commitlint.config.js': 'commitlint.config.js',
'semantic.yml': '.github/semantic.yml'
'semantic.yml': '.github/semantic.yml',
'dependabot.yml': '.github/dependabot.yml'
}
})

Expand Down

0 comments on commit 80e04e9

Please sign in to comment.