Skip to content

Commit

Permalink
Script for potential GH actions
Browse files Browse the repository at this point in the history
  • Loading branch information
SamErde committed Sep 18, 2024
1 parent 1316d88 commit 256d0d3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflow-scripts/Get-RepositoryInfo.ps1
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 256d0d3

Please sign in to comment.