{{ $useHeaderRow := .Get "header" }} {{ $csv := .Get "csv" }} {{ $file := readFile $csv }} {{ $rows := $file | transform.Unmarshal (dict "delimiter" ",") }} {{ $rows = after 1 $rows }} {{ $useLinks := .Get "useLinks" | default true }} {{ $language := .Get "language" }} {{ $moduleType := .Get "moduleType" }} {{ $ProviderNamespaceColumnId := 0 }} {{ $ResourceTypeColumnId := 0 }} {{ $ModuleDisplayNameColumnId := 0 }} {{ $AlternativeNamesColumnId := 0 }} {{ $ModuleNameColumnId := 0 }} {{ $ParentModuleColumnId := 0 }} {{ $ModuleStatusColumnId := 0 }} {{ $RepoURLColumnId := 0 }} {{ $PublicRegistryReferenceColumnId := 0 }} {{ $TelemetryIdPrefixColumnId := 0 }} {{ $PrimaryModuleOwnerGHHandleColumnId := 0 }} {{ $PrimaryModuleOwnerDisplayNameColumnId := 0 }} {{ $SecondaryModuleOwnerGHHandleColumnId := 0 }} {{ $SecondaryModuleOwnerDisplayNameColumnId := 0 }} {{ $ModuleOwnersGHTeamColumnId := 0 }} {{ $DescriptionColumnId := 0 }} {{ $CommentsColumnId := 0 }} {{ $FirstPublishedInColumnId := 0 }} {{ $hasModulesAvailable := false }} {{ $maps := slice }} {{ $i := 0 }} {{ if eq $moduleType "resource" }} {{ $ProviderNamespaceColumnId = 0 }} {{ $ResourceTypeColumnId = 1 }} {{ $ModuleDisplayNameColumnId = 2 }} {{ $AlternativeNamesColumnId = 3 }} {{ $ModuleNameColumnId = 4 }} {{ $ParentModuleColumnId = 5 }} {{ $ModuleStatusColumnId = 6 }} {{ $RepoURLColumnId = 7 }} {{ $PublicRegistryReferenceColumnId = 8 }} {{ $TelemetryIdPrefixColumnId = 9 }} {{ $PrimaryModuleOwnerGHHandleColumnId = 10 }} {{ $PrimaryModuleOwnerDisplayNameColumnId = 11 }} {{ $SecondaryModuleOwnerGHHandleColumnId = 12 }} {{ $SecondaryModuleOwnerDisplayNameColumnId = 13 }} {{ $ModuleOwnersGHTeamColumnId = 14 }} {{ $DescriptionColumnId = 15 }} {{ $CommentsColumnId = 16 }} {{ $FirstPublishedInColumnId = 17 }} {{ range $row, $rows }} {{ $map := dict "ProviderNamespace" (index $row $ProviderNamespaceColumnId) "ResourceType" (index $row $ResourceTypeColumnId) "ModuleDisplayName" (index $row $ModuleDisplayNameColumnId) "AlternativeNames" (index $row $AlternativeNamesColumnId) "ModuleName" (index $row $ModuleNameColumnId) "ParentModule" (index $row $ParentModuleColumnId) "ModuleStatus" (index $row $ModuleStatusColumnId) "RepoURL" (index $row $RepoURLColumnId) "PublicRegistryReference" (index $row $PublicRegistryReferenceColumnId) "TelemetryIdPrefix" (index $row $TelemetryIdPrefixColumnId) "PrimaryModuleOwnerGHHandle" (index $row $PrimaryModuleOwnerGHHandleColumnId) "PrimaryModuleOwnerDisplayName" (index $row $PrimaryModuleOwnerDisplayNameColumnId) "SecondaryModuleOwnerGHHandle" (index $row $SecondaryModuleOwnerGHHandleColumnId) "SecondaryModuleOwnerDisplayName" (index $row $SecondaryModuleOwnerDisplayNameColumnId) "ModuleOwnersGHTeam" (index $row $ModuleOwnersGHTeamColumnId) "Description" (index $row $DescriptionColumnId) "Comments" (index $row $CommentsColumnId) "FirstPublishedInColumnId" (index $row $FirstPublishedInColumnId) }} {{ $maps = $maps | append $map }} {{ end }} {{ else if or (eq $moduleType "pattern") (eq $moduleType "utility") }} {{ $ModuleDisplayNameColumnId = 0 }} {{ $AlternativeNamesColumnId = 1 }} {{ $ModuleNameColumnId = 2 }} {{ $ModuleStatusColumnId = 3 }} {{ $RepoURLColumnId = 4 }} {{ $PublicRegistryReferenceColumnId = 5 }} {{ $TelemetryIdPrefixColumnId = 6 }} {{ $PrimaryModuleOwnerGHHandleColumnId = 7 }} {{ $PrimaryModuleOwnerDisplayNameColumnId = 8 }} {{ $SecondaryModuleOwnerGHHandleColumnId = 9 }} {{ $SecondaryModuleOwnerDisplayNameColumnId = 10 }} {{ $ModuleOwnersGHTeamColumnId = 11 }} {{ $DescriptionColumnId = 12 }} {{ $CommentsColumnId = 13 }} {{ $FirstPublishedInColumnId = 14 }} {{ range $row, $rows }} {{ $map := dict "ModuleDisplayName" (index $row $ModuleDisplayNameColumnId) "AlternativeNames" (index $row $AlternativeNamesColumnId) "ModuleName" (index $row $ModuleNameColumnId) "ModuleStatus" (index $row $ModuleStatusColumnId) "RepoURL" (index $row $RepoURLColumnId) "PublicRegistryReference" (index $row $PublicRegistryReferenceColumnId) "TelemetryIdPrefix" (index $row $TelemetryIdPrefixColumnId) "PrimaryModuleOwnerGHHandle" (index $row $PrimaryModuleOwnerGHHandleColumnId) "PrimaryModuleOwnerDisplayName" (index $row $PrimaryModuleOwnerDisplayNameColumnId) "SecondaryModuleOwnerGHHandle" (index $row $SecondaryModuleOwnerGHHandleColumnId) "SecondaryModuleOwnerDisplayName" (index $row $SecondaryModuleOwnerDisplayNameColumnId) "ModuleOwnersGHTeam" (index $row $ModuleOwnersGHTeamColumnId) "Description" (index $row $DescriptionColumnId) "Comments" (index $row $CommentsColumnId) "FirstPublishedInColumnId" (index $row $FirstPublishedInColumnId) }} {{ $maps = $maps | append $map }} {{ end }} {{ else }} {{ errorf "The %q shortcode requires a moduleType parameter to bet set to either 'resource', 'pattern' or 'utility'. See %s" .Name .Position }} {{ end }} {{ $maps = sort $maps "ModuleName" }} {{ $i = 1 }} {{ if eq $language "Bicep" }}
| No. | Module Name | Telemetry ID prefix | GitHub Teams for Module Owners (@Azure org) |
|---|---|---|---|
| {{/* row index */}} {{- printf "%02d" $i -}} {{- $i = add $i 1 -}} | {{/* module name and link to the repo */}} {{- if $useLinks -}} {{- if or (eq $item.ModuleStatus "Available") (eq $item.ModuleStatus "Orphaned") -}} {{ $item.ModuleName }} {{- else -}} {{ $item.ModuleName }} {{- end -}} {{- else -}} {{ $item.ModuleName }} {{- end -}} | {{/* telemetry ID prefix */}}
{{ $item.TelemetryIdPrefix }}
|
{{/* GH teams */}}
{{- if or (eq $ParentModuleColumnId 0) (eq $item.ParentModule "n/a") -}}
{{- $cleanTeamName := replace $item.ModuleOwnersGHTeam "@Azure/" "" -}}
{{ $cleanTeamName }}
{{- else -}}
{{- range $element, $maps -}}
{{- if eq $element.ModuleName $item.ParentModule -}}
{{- $cleanTeamName := replace $element.ModuleOwnersGHTeam "@Azure/" "" -}}
{{ $cleanTeamName }}
{{- end -}}
{{- end -}}
{{- end -}}
|
| {{ printf "%02d" $i }}{{ $i = add $i 1 }} | ❌ None available | ❌ None available | ❌ None available |
| No. | Module Name | GitHub Teams for Module Owners and Contributors (@Azure org) |
|
|---|---|---|---|
| {{/* row index */}} {{- printf "%02d" $i -}} {{- $i = add $i 1 -}} | {{/* module name and link to the repo */}} {{- if $useLinks -}} {{- if or (eq $item.ModuleStatus "Available") (eq $item.ModuleStatus "Orphaned") -}} {{ $item.ModuleName }} {{- else -}} {{ $item.ModuleName }} {{- end -}} {{- else -}} {{ $item.ModuleName }} {{- end -}} | {{/* GH teams */}}
{{- if or (eq $ParentModuleColumnId 0) (eq $item.ParentModule "n/a") -}}
{{- $cleanOwnersTeamName := replace $item.ModuleOwnersGHTeam "@Azure/" "" -}}
{{ $cleanOwnersTeamName }}
{{- else -}}
{{- range $element, $maps -}}
{{- if eq $element.ModuleName $item.ParentModule -}}
{{- $cleanOwnersTeamName := replace $element.ModuleOwnersGHTeam "@Azure/" "" -}}
{{ $cleanOwnersTeamName }}
{{- end -}}
{{- end -}}
{{- end -}}
|
|
| {{ printf "%02d" $i }}{{ $i = add $i 1 }} | ❌ None available | ❌ None available | ❌ None available |