Skip to content

Commit 0d70e33

Browse files
Simplify rate limit log group titles
1 parent 9fcba3b commit 0d70e33

3 files changed

Lines changed: 1 addition & 6 deletions

File tree

src/info.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ process {
6161
}
6262
} # end if ($showInfo)
6363

64-
$env:PSMODULE_GITHUB_SCRIPT_RATELIMIT_LABEL = 'Pre'
6564
& "$PSScriptRoot/ratelimit.ps1"
6665

6766
$fenceEnd = '' + ('' * ($fenceStart.Length - 2)) + ''

src/outputs.ps1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ try {
4646
}
4747
} # end if ($result)
4848

49-
$env:PSMODULE_GITHUB_SCRIPT_RATELIMIT_LABEL = 'Post'
5049
& "$PSScriptRoot/ratelimit.ps1"
5150

5251
$fenceEnd = '' + ('' * ($fenceStart.Length - 2)) + ''

src/ratelimit.ps1

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
#Requires -Modules GitHub
22

33
# Helper script - called from info.ps1 and outputs.ps1 to display rate limit information.
4-
# Expects $env:PSMODULE_GITHUB_SCRIPT_RATELIMIT_LABEL to be set to 'Pre' or 'Post'.
54

65
if ($env:PSMODULE_GITHUB_SCRIPT_INPUT_ShowRateLimit -ne 'true') {
76
return
87
}
98

10-
$label = $env:PSMODULE_GITHUB_SCRIPT_RATELIMIT_LABEL
11-
12-
LogGroup " - Rate Limit ($label)" {
9+
LogGroup ' - Rate Limit' {
1310
try {
1411
Get-GitHubRateLimit -ErrorAction Stop |
1512
Select-Object Name, Limit, Used, Remaining, ResetsAt, ResetsIn |

0 commit comments

Comments
 (0)