Commit 710c25e 1 parent 4624d9c commit 710c25e Copy full SHA for 710c25e
File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ const sharedRootAdd = (name) => ({
37
37
// dependabot
38
38
'.github/dependabot.yml' : {
39
39
file : 'dependabot.yml' ,
40
+ filter : ( p ) => p . config . dependabot ,
40
41
clean : ( p ) => p . config . isRoot ,
41
42
// dependabot takes a single top level config file. this parser
42
43
// will run for all configured packages and each one will have
@@ -48,6 +49,7 @@ const sharedRootAdd = (name) => ({
48
49
} ,
49
50
'.github/workflows/post-dependabot.yml' : {
50
51
file : 'post-dependabot.yml' ,
52
+ filter : ( p ) => p . config . dependabot ,
51
53
} ,
52
54
'.github/settings.yml' : {
53
55
file : 'settings.yml' ,
Original file line number Diff line number Diff line change
1
+ const t = require ( 'tap' )
2
+ const setup = require ( '../setup.js' )
3
+
4
+ t . test ( 'default dependabot' , async ( t ) => {
5
+ const s = await setup ( t )
6
+ await s . apply ( )
7
+
8
+ const dependabot = await s . readFile ( '.github/dependabot.yml' )
9
+ const postDependabot = await s . stat ( '.github/workflows/post-dependabot.yml' )
10
+
11
+ t . match ( dependabot , 'increase-if-necessary' )
12
+ t . ok ( postDependabot )
13
+ } )
14
+
15
+ t . test ( 'no dependabot' , async ( t ) => {
16
+ const s = await setup ( t , {
17
+ package : {
18
+ templateOSS : {
19
+ dependabot : false ,
20
+ } ,
21
+ } ,
22
+ } )
23
+ await s . apply ( )
24
+
25
+ const dependabot = await s . stat ( '.github/dependabot.yml' ) . catch ( ( ) => false )
26
+ const postDependabot = await s . stat ( '.github/workflows/post-dependabot.yml' ) . catch ( ( ) => false )
27
+
28
+ t . equal ( dependabot , false )
29
+ t . equal ( postDependabot , false )
30
+ } )
You can’t perform that action at this time.
0 commit comments