Skip to content

Commit 18e354f

Browse files
🩹 [Patch]: Add GH Auth status if not App context (#35)
## Description This pull request includes an enhancement to the GitHub connection logging process in the `scripts/info.ps1` file. The change ensures that the GitHub CLI authentication status is checked and displayed if the authentication type is not 'APP'. Improvements to GitHub connection logging: * [`scripts/info.ps1`](diffhunk://#diff-82c586f67d16e32953b47a962c269d0a484f8aa660d71ad354e91fd2d4334cd9L28-R35): Modified the logging process to store the GitHub context in a variable and added a conditional check to display the GitHub CLI authentication status when the authentication type is not 'APP'. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 39838dc commit 18e354f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/info.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ process {
2525
}
2626

2727
LogGroup ' - GitHub connection - Default' {
28-
Get-GitHubContext | Format-List
28+
$context = Get-GitHubContext
29+
$context | Format-List
30+
31+
if ($context.AuthType -ne 'APP') {
32+
Write-Output 'GitHub CLI status:'
33+
gh auth status
34+
$LASTEXITCODE = 0
35+
}
2936
}
3037

3138
LogGroup ' - GitHub connection - List' {

0 commit comments

Comments
 (0)