From 256d0d3ec2e032e574c8811ad6c6263e8734df47 Mon Sep 17 00:00:00 2001 From: Sam Erde Date: Wed, 18 Sep 2024 10:23:17 -0400 Subject: [PATCH] Script for potential GH actions --- .../workflow-scripts/Get-RepositoryInfo.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflow-scripts/Get-RepositoryInfo.ps1 diff --git a/.github/workflow-scripts/Get-RepositoryInfo.ps1 b/.github/workflow-scripts/Get-RepositoryInfo.ps1 new file mode 100644 index 0000000..496ecdc --- /dev/null +++ b/.github/workflow-scripts/Get-RepositoryInfo.ps1 @@ -0,0 +1,18 @@ +function Get-RepositoryInfo { + [CmdletBinding()] + param ( + ) + + $RepositoryRoot = [System.IO.Path]::Combine($PSScriptRoot, '..', '..') + + [PSCustomObject]$Info = @{ + NumberOfScripts = (Get-ChildItem $RepositoryRoot -Filter *.ps1 -File -Recurse).Count + NumberOfFOlders = (Get-ChildItem $RepositoryRoot -Directory -Recurse).Count + Categories = (Get-ChildItem -Path $RepositoryRoot -Directory -Exclude '.github').Name + CategoryList = (Get-ChildItem -Path $RepositoryRoot -Directory -Exclude '.github').Name -replace 'DDI', 'DDI (DNS, DHCP, IPAM)' -join ', ' + } + + $Info +} + +Get-RepositoryInfo