Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
5bd31f2
🩹 [Patch]: Add Linter environment variables for validation checks in …
MariusStorhaug Oct 6, 2025
4bb946a
🩹 [Patch]: Add VALIDATE_POWERSHELL option to Linter environment varia…
MariusStorhaug Oct 6, 2025
3c1dfdc
Fix Docs
MariusStorhaug Oct 6, 2025
9e90d3c
🩹 [Patch]: Clean up comments in .markdown-lint.yml for better readabi…
MariusStorhaug Oct 8, 2025
5571919
🩹 [Patch]: Enhance documentation for Start-GitHubLogGroup and Stop-Gi…
MariusStorhaug Oct 12, 2025
e561045
🩹 [Patch]: Add PowerShell code examples to documentation for various …
MariusStorhaug Oct 12, 2025
c07103a
Enhance PowerShell function documentation with code examples
MariusStorhaug Oct 12, 2025
ebf18e3
🩹 [Patch]: Update code examples in PowerShell functions to use 'power…
MariusStorhaug Oct 12, 2025
9b52d34
Fix
MariusStorhaug Oct 12, 2025
2415382
Convert to UTF8withBom
MariusStorhaug Oct 12, 2025
6728269
Fix formatting in documentation for Enable-GitHubWorkflow function
MariusStorhaug Oct 12, 2025
5b21d8d
Fix formatting in documentation examples across multiple PowerShell f…
MariusStorhaug Oct 12, 2025
86c7851
Fix formatting in ConvertFrom-GitHubOutput documentation examples for…
MariusStorhaug Oct 12, 2025
79527f3
Fix formatting in documentation examples for Get-GitHubRepositoryList…
MariusStorhaug Oct 12, 2025
223c613
Remove 'Flaky' tag from SelectedRepository context in Variables.Tests…
MariusStorhaug Oct 12, 2025
cd916da
Add 'Flaky' tag to SelectedRepository context in Variables.Tests.ps1
MariusStorhaug Oct 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .github/PSModule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,14 @@ Test:
# Build:
# Docs:
# Skip: true

Linter:
env:
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
VALIDATE_POWERSHELL: false
18 changes: 9 additions & 9 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
###############
# Rules by id #
###############
MD004: false # Unordered list style
MD004: false # Unordered list style
MD007:
indent: 2 # Unordered list indentation
indent: 2 # Unordered list indentation
MD013:
line_length: 808 # Line length
MD024: false # no-duplicate-heading, INPUTS and OUTPUTS _can_ be the same item
line_length: 808 # Line length
MD024: false # no-duplicate-heading, INPUTS and OUTPUTS _can_ be the same item
MD026:
punctuation: ".,;:!。,;:" # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading
punctuation: '.,;:!。,;:' # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading

#################
# Rules by tags #
#################
blank_lines: false # Error on blank lines
blank_lines: false # Error on blank lines
2 changes: 1 addition & 1 deletion src/classes/public/GitHubPermission.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class GitHubPermission : System.IEquatable[Object] {
class GitHubPermission : System.IEquatable[Object] {
# The programmatic name of the permission as returned by the GitHub API
[string] $Name

Expand Down
2 changes: 2 additions & 0 deletions src/functions/private/Actions/Import-GitHubEventData.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ function Import-GitHubEventData {
Import data from the event that triggered the workflow.

.EXAMPLE
```powershell
Import-GitHubEventData
```
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseShouldProcessForStateChangingFunctions', '',
Expand Down
2 changes: 2 additions & 0 deletions src/functions/private/Actions/Import-GitHubRunnerData.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
Import data about the runner that is running the workflow.

.EXAMPLE
```powershell
Import-GitHubRunnerData
```
#>
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseShouldProcessForStateChangingFunctions', '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@
`created`, `event`, `head_sha`, `status`.

.EXAMPLE
```powershell
Get-GitHubWorkflowRunByRepo -Owner 'owner' -Repository 'repo'
```

Lists all workflow runs for a repository.

.EXAMPLE
```powershell
Get-GitHubWorkflowRunByRepo -Owner 'owner' -Repository 'repo' -Actor 'octocat' -Branch 'main' -Event 'push' -Status 'success'
```

Lists all workflow runs for a repository with the specified actor, branch, event, and status.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
`created`, `event`, `head_sha`, `status`.

.EXAMPLE
```powershell
Get-GitHubWorkflowRunByWorkflow -Owner 'octocat' -Repository 'Hello-World' -ID '42'
```

Gets all workflow runs for the workflow with the ID `42` in the repository `Hello-World` owned by `octocat`.

.EXAMPLE
```powershell
Get-GitHubWorkflowRunByWorkflow -Owner 'octocat' -Repository 'Hello-World' -ID '42' -Actor 'octocat' -Branch 'main' -Event 'push' -Status 'success'
```

Gets all workflow runs for the workflow with the ID `42` in the repository `Hello-World` owned by `octocat` that were triggered by the user
`octocat` on the branch `main` and have the status `success`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
The function supports authentication via Azure CLI or Az PowerShell module and returns the signed JWT as a secure string.

.EXAMPLE
```powershell
Add-GitHubKeyVaultJWTSignature -UnsignedJWT 'header.payload' -KeyVaultKeyReference 'https://myvault.vault.azure.net/keys/mykey'
```

Output:
```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
This function handles the RSA signing process and returns the complete signed JWT.

.EXAMPLE
```powershell
Add-GitHubLocalJWTSignature -UnsignedJWT 'eyJ0eXAiOi...' -PrivateKey '--- BEGIN RSA PRIVATE KEY --- ... --- END RSA PRIVATE KEY ---'
```

Adds a signature to the unsigned JWT using the provided private key.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
to access this endpoint.

.EXAMPLE
```powershell
Get-GitHubAppAsAuthenticatedApp
```

Get the authenticated app.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
Gets a single GitHub App using the app's slug.

.EXAMPLE
```powershell
Get-GitHubAppByName -AppSlug 'github-actions'
```

Gets the GitHub App with the slug 'github-actions'.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
- enterprise_organization_installations: read

.EXAMPLE
```powershell
Get-GitHubAppInstallableOrganization -Enterprise 'msx'
```

.OUTPUTS
GitHubOrganization[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
to access this endpoint.

.EXAMPLE
```powershell
Get-GitHubAppInstallationForAuthenticatedAppAsList
```

List installations for the authenticated app.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
to access this endpoint.

.EXAMPLE
```powershell
Get-GitHubAppInstallationForAuthenticatedAppByID -ID 123456
```

Get an installation for the authenticated app with the specified ID.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
The authenticated GitHub App must be installed on the enterprise and be granted the Enterprise/organization_installations (read) permission.

.EXAMPLE
```powershell
Get-GitHubAppInstallationForEnterpriseOrganization -Enterprise 'msx' -Organization 'github'
```

Gets all GitHub Apps in the organization `github` in the enterprise `msx`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
You must be an organization owner with `admin:read` scope to use this endpoint.

.EXAMPLE
```powershell
Get-GitHubAppInstallationForOrganization -Organization 'github'
```

Gets all GitHub Apps in the organization `github`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
The authenticated GitHub App must be installed on the enterprise and be granted the Enterprise/organization_installations (write) permission.

.EXAMPLE
```powershell
Install-GitHubAppOnEnterpriseOrganization -Enterprise 'msx' -Organization 'org' -ClientID '123456'
```
#>
[OutputType([GitHubAppInstallation])]
[CmdletBinding()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
that can be passed to a signing function.

.EXAMPLE
```powershell
New-GitHubUnsignedJWT -ClientId 'Iv987654321'
```

Creates an unsigned JWT for a GitHub App using the specified client ID.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Test-GitHubJWTRefreshRequired {
function Test-GitHubJWTRefreshRequired {
<#
.SYNOPSIS
Test if the GitHub JWT should be refreshed.
Expand All @@ -7,7 +7,9 @@ function Test-GitHubJWTRefreshRequired {
Test if the GitHub JWT should be refreshed. JWTs are refreshed when they have 150 seconds or less remaining before expiration.

.EXAMPLE
```powershell
Test-GitHubJWTRefreshRequired -Context $Context
```

This will test if the GitHub JWT should be refreshed for the specified context.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Uninstall-GitHubAppAsApp {
function Uninstall-GitHubAppAsApp {
<#
.SYNOPSIS
Delete an installation for the authenticated app.
Expand All @@ -7,7 +7,9 @@ function Uninstall-GitHubAppAsApp {
Deletes a GitHub App installation using the authenticated App context.

.EXAMPLE
```powershell
Uninstall-GitHubAppAsApp -ID 123456 -Context $appContext
```

Deletes the installation with ID 123456 for the authenticated app.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
The authenticated GitHub App must be installed on the enterprise and be granted the Enterprise/organization_installations (write) permission.

.EXAMPLE
```powershell
Uninstall-GitHubAppOnEnterpriseOrganization -Enterprise 'github' -Organization 'octokit' -ID '123456'
```

Uninstall the GitHub App with the installation ID `123456` from the organization `octokit` in the enterprise `github`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,23 @@
it will be refreshed. This function implements mutex-based locking to prevent concurrent refreshes.

.EXAMPLE
```powershell
Update-GitHubAppJWT -Context $Context
```

Updates the JSON Web Token (JWT) for a GitHub App using the specified context.

.EXAMPLE
```powershell
Update-GitHubAppJWT -Context $Context -PassThru
```

This will update the GitHub App JWT for the specified context and return the updated context.

.EXAMPLE
```powershell
Update-GitHubAppJWT -Context $Context -Silent
```

This will update the GitHub App JWT for the specified context without displaying progress messages.

Expand Down
2 changes: 2 additions & 0 deletions src/functions/private/Artifacts/Get-GitHubArtifactById.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
The function returns a custom GitHubArtifact object containing metadata and download information for the artifact.

.EXAMPLE
```powershell
Get-GitHubArtifactById -Owner 'octocat' -Repository 'hello-world' -ID '123456'
```

Output:
```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
By default, only the latest version of each artifact is returned unless -AllVersions is specified.

.EXAMPLE
```powershell
Get-GitHubArtifactFromRepository -Owner 'octocat' -Repository 'demo-repo' -AllVersions
```

Output:
```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
The function can optionally filter artifacts by name or return only the latest version per artifact name.

.EXAMPLE
```powershell
Get-GitHubArtifactFromWorkflowRun -Owner 'octocat' -Repository 'demo' -ID '123456789'
```

Output:
```powershell
Expand Down
2 changes: 2 additions & 0 deletions src/functions/private/Auth/Cli/Connect-GithubCli.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
If authentication fails, a warning is displayed, and `LASTEXITCODE` is reset to `0`.

.EXAMPLE
```powershell
$context = Connect-GitHubAccount
$context | Connect-GitHubCli
```

Output:
```powershell
Expand Down
2 changes: 2 additions & 0 deletions src/functions/private/Auth/Context/Assert-GitHubContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
If the context does not meet the requirements, an error is thrown.

.EXAMPLE
```powershell
Assert-GitHubContext -Context 'github.com/Octocat' -AuthType 'App'
```
#>
[OutputType([void])]
[CmdletBinding()]
Expand Down
4 changes: 4 additions & 0 deletions src/functions/private/Auth/Context/Remove-GitHubContext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
If the specified context(s) exist, they will be removed from the vault.

.EXAMPLE
```powershell
Remove-Context
```

Removes all contexts from the vault.

.EXAMPLE
```powershell
Remove-Context -ID 'MyContext'
```

Removes the context called 'MyContext' from the vault.
#>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@
If the context is a App, it will look at the available contexts and return the one that matches the scope of the command being run.

.EXAMPLE
```powershell
$Context = Resolve-GitHubContext -Context 'github.com/Octocat'
```

This will resolve the context 'github.com/Octocat' into a GitHubContext object.

.EXAMPLE
```powershell
$Context = Resolve-GitHubContext -Context $GitHubContext
```

This will return the GitHubContext object.
#>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
it will return the default value from the GitHub configuration. This is useful for resolving API-related settings dynamically.

.EXAMPLE
```powershell
Resolve-GitHubContextSetting -Name 'Repository' -Value 'MyRepo'
```

Output:
```powershell
Expand All @@ -19,7 +21,9 @@
Returns the provided value 'MyRepo' for the 'Repository' setting.

.EXAMPLE
```powershell
Resolve-GitHubContextSetting -Name 'Repository' -Context $GitHubContext
```

Output:
```powershell
Expand All @@ -29,7 +33,9 @@
Retrieves the 'Repository' setting from the provided GitHub context object.

.EXAMPLE
```powershell
Resolve-GitHubContextSetting -Name 'ApiBaseUrl'
```

Output:
```powershell
Expand Down
Loading
Loading