2cddf06b6c
Co-authored-by: 旅行呀~ <travelxiao@qq.com>
24 lines
905 B
PowerShell
24 lines
905 B
PowerShell
# Agent-safe: print local author profile fields. Never touches the token.
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
. (Join-Path $PSScriptRoot 'common.ps1')
|
|
|
|
$gitProfile = Get-GitSkillsProfile
|
|
if ($null -eq $gitProfile) {
|
|
Write-StatusLine -Key 'profile' -Value 'missing'
|
|
exit 0
|
|
}
|
|
|
|
Write-StatusLine -Key 'profile' -Value 'present'
|
|
Write-StatusLine -Key 'path' -Value $script:ProfilePath
|
|
Write-StatusLine -Key 'userName' -Value ([string]$gitProfile.userName)
|
|
Write-StatusLine -Key 'userEmail' -Value ([string]$gitProfile.userEmail)
|
|
Write-StatusLine -Key 'gitUsername' -Value ([string]$gitProfile.gitUsername)
|
|
Write-StatusLine -Key 'sshKeyPath' -Value ([string]$gitProfile.sshKeyPath)
|
|
|
|
$trailers = Get-CoAuthorTrailerLines -GitProfile $gitProfile
|
|
Write-StatusLine -Key 'co_authored_by_count' -Value "$($trailers.Count)"
|
|
foreach ($line in $trailers) {
|
|
Write-StatusLine -Key 'co_authored_by' -Value $line
|
|
}
|