File tree Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -57,8 +57,10 @@ gitlab:
5757 url : " <gitlab api url>" # Gitlab API base url
5858 groups : # List of your project’s groups (optional if projects are defined)
5959 - id : 4 # Group id
60- excluded : [1, 2, 3] # List of projects to exclude from the current group projects (optional)
6160 - id : 5
61+ excluded : [1, 2, 3] # List of projects to exclude from the current group projects (optional)
62+ - id : 6
63+ withShared : false # Whether to include shared projects or not, defaults to true
6264 projects : # List of your project (optional if groups are defined)
6365 - id : 42 # Project id
6466 paths : # List of paths that should be changed in merge requests
Original file line number Diff line number Diff line change @@ -33,9 +33,11 @@ class GitLab {
3333 return this . __getPaginated ( uri , query )
3434 }
3535
36- groupProjects = group => {
36+ groupProjects = ( group , { withShared } ) => {
3737 const uri = this . __getUrl ( "groups" , group , "projects" )
38- return this . __getPaginated ( uri )
38+ const query = { with_shared : withShared }
39+
40+ return this . __getPaginated ( uri , query )
3941 . then ( projects => projects . map ( project => project . id ) )
4042 }
4143
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ gitlab:
1818 - id : 44
1919 groups :
2020 - id : 4
21- excluded : [1, 2, 3]
2221 - id : 5
23- excluded : [11, 12 ]
22+ excluded : [1, 2, 3 ]
2423 - id : 6
24+ withShared : false
2525
2626# tasks config
2727unapproved :
Original file line number Diff line number Diff line change 11{
22 "name" : " @cadolabs/gbot" ,
3- "version" : " 2.3.2 " ,
3+ "version" : " 2.4.0 " ,
44 "bin" : " gbot" ,
55 "repository" : " https://github.com/Cado-Labs/gbot" ,
66 "author" : " Aleksei Bespalov <nulldefiner@gmail.com>" ,
Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ class BaseCommand {
2727
2828 if ( _ . isEmpty ( groups ) ) return Promise . resolve ( configProjects )
2929
30- const promises = groups . map ( ( { id, excluded = [ ] } ) => (
31- this . gitlab . groupProjects ( id ) . then ( groupProjects => (
30+ const promises = groups . map ( ( { id, withShared = true , excluded = [ ] } ) => (
31+ this . gitlab . groupProjects ( id , { withShared } ) . then ( groupProjects => (
3232 groupProjects . filter ( p => ! excluded . includes ( p ) )
3333 ) )
3434 ) )
You can’t perform that action at this time.
0 commit comments