Skip to content

Commit c9bc7db

Browse files
📖 [Docs]: Cleanup and clarification (#138)
## Description - Update docs - Remove dev code as functionality is implemented ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [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 cc6e24c commit c9bc7db

File tree

7 files changed

+58
-483
lines changed

7 files changed

+58
-483
lines changed

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,12 @@ To dive into the world of GitHub automation with PowerShell, follow the sections
2727
Download and install the GitHub PowerShell module from the PowerShell Gallery with the following command:
2828

2929
```powershell
30-
Install-Module -Name GitHub -Force -AllowClobber
30+
Install-PSResource -Name GitHub -Repository PSGallery -TrustRepository
3131
```
3232

3333
### Logging on
3434

35-
Authenticate using your GitHub credentials or access tokens to begin executing commands. Tokens and other
36-
configuration details are stored encrypted on the system using the PowerShell modules [SecretManagement and SecretStore Overview](https://learn.microsoft.com/en-us/powershell/utility-modules/secretmanagement/overview?view=ps-modules),
37-
for more info on the implementation, see the section on storing configuration.
35+
Authenticate using your GitHub credentials or access tokens to begin executing commands. The module supports multiple authentication methods.
3836

3937
#### Device flow
4038

@@ -107,6 +105,32 @@ Connect-GitHubAccount
107105
✓ Logged in as system!
108106
```
109107

108+
#### Using a GitHub App
109+
110+
If you are using a GitHub App, you can use the `Connect-GitHubApp` command to authenticate using the client ID and private key.
111+
112+
```powershell
113+
Connect-GitHubApp -ClientId 'lv123456789' -PrivateKey '-----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY-----'
114+
✓ Logged in as my-github-app!
115+
```
116+
117+
#### Using a different host
118+
119+
If you are using GitHub Enterprise, you can use the `-Host` parameter to specify the host you want to connect to.
120+
This can be used in combination with all the other authentication methods.
121+
122+
```powershell
123+
Connect-GitHubAccount -Host 'https://github.local'
124+
✓ Logged in as octocat!
125+
```
126+
127+
Or you might be using GitHub Enterprise Cloud with Data Residency.
128+
129+
```powershell
130+
Connect-GitHubAccount -Host 'https://msx.ghe.com'
131+
✓ Logged in as octocat!
132+
```
133+
110134
### Command Exploration
111135

112136
Familiarize yourself with the available cmdlets using the module's comprehensive documentation or inline help.

src/en-US/about_Auth.help.txt

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/en-US/about_Config.help.txt

Lines changed: 0 additions & 107 deletions
This file was deleted.

tools/dev/Get-GitHubAppInstallations.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11

2-
#List installations for the authenticated app
3-
Invoke-RestMethod -Uri 'https://api.github.com/app/installations' -Headers @{
4-
Authorization = "Bearer $token"
5-
}
2+
# #List installations for the authenticated app
3+
# Implemented...
4+
# Invoke-RestMethod -Uri 'https://api.github.com/app/installations' -Headers @{
5+
# Authorization = "Bearer $token"
6+
# }
67

78

89
#Get an organization installation for the authenticated app

0 commit comments

Comments
 (0)