@@ -39,15 +39,15 @@ const TEMPLATE_README_TEMPLATE = `
3939_Note: This file was auto-generated from the [devcontainer-template.json](#{RepoUrl}). Add additional notes to a \`NOTES.md\`._
4040` ;
4141
42- export async function generateFeaturesDocumentation ( basePath : string , ociRegistry : string , namespace : string ) {
43- await _generateDocumentation ( basePath , FEATURES_README_TEMPLATE , 'devcontainer-feature.json' , ociRegistry , namespace ) ;
42+ export async function generateFeaturesDocumentation ( basePath : string , ociRegistry : string , namespace : string , defaultBranch : string ) {
43+ await _generateDocumentation ( basePath , FEATURES_README_TEMPLATE , 'devcontainer-feature.json' , defaultBranch , ociRegistry , namespace ) ;
4444}
4545
46- export async function generateTemplateDocumentation ( basePath : string ) {
47- await _generateDocumentation ( basePath , TEMPLATE_README_TEMPLATE , 'devcontainer-template.json' ) ;
46+ export async function generateTemplateDocumentation ( basePath : string , defaultBranch : string ) {
47+ await _generateDocumentation ( basePath , TEMPLATE_README_TEMPLATE , 'devcontainer-template.json' , defaultBranch ) ;
4848}
4949
50- async function _generateDocumentation ( basePath : string , readmeTemplate : string , metadataFile : string , ociRegistry : string = '' , namespace : string = '' ) {
50+ async function _generateDocumentation ( basePath : string , readmeTemplate : string , metadataFile : string , defaultBranch : string , ociRegistry : string = '' , namespace : string = '' ) {
5151 const directories = fs . readdirSync ( basePath ) ;
5252
5353 await Promise . all (
@@ -117,7 +117,7 @@ async function _generateDocumentation(basePath: string, readmeTemplate: string,
117117 let urlToConfig = `${ metadataFile } ` ;
118118 const basePathTrimmed = basePath . startsWith ( './' ) ? basePath . substring ( 2 ) : basePath ;
119119 if ( srcInfo . owner && srcInfo . repo ) {
120- urlToConfig = `https://github.com/${ srcInfo . owner } /${ srcInfo . repo } /blob/main /${ basePathTrimmed } /${ f } /${ metadataFile } ` ;
120+ urlToConfig = `https://github.com/${ srcInfo . owner } /${ srcInfo . repo } /blob/${ defaultBranch } /${ basePathTrimmed } /${ f } /${ metadataFile } ` ;
121121 }
122122
123123 let header ;
0 commit comments