File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -122,13 +122,22 @@ begin
122122 end
123123
124124 @local_modules = parser . local_modules . sort . map do |mod |
125- readme = make_request ( "https://raw.githubusercontent.com/puppetlabs/bolt/main/modules/#{ mod . first } /README.md" )
126- match = readme . match ( /## Description(?<desc>.*)## Req/m )
125+ # r10k puts git hosted modules under @local_modules,
126+ # handle the ones with local: true as truely local
127+ if mod [ 1 ] [ :local ]
128+ readme = make_request ( "https://raw.githubusercontent.com/puppetlabs/bolt/main/modules/#{ mod . first } /README.md" )
129+ match = readme . match ( /## Description(?<desc>.*)## Req/m )
130+ description = match [ :desc ] . strip
131+ url = "https://github.com/puppetlabs/bolt/tree/main/modules/#{ mod . first } "
132+ else
133+ description = 'See git repo for details'
134+ url = mod [ 1 ] [ :git ] || ''
135+ end
127136
128137 {
129138 name : mod . first ,
130- description : match [ :desc ] . strip ,
131- url : "https://github.com/puppetlabs/bolt/tree/main/modules/ #{ mod . first } "
139+ description : description ,
140+ url : url
132141 }
133142 end
134143
You can’t perform that action at this time.
0 commit comments