Remove-GitHubArtifact
SYNOPSIS
Cleanup artifacts from GitHub repo
SYNTAX
Remove-GitHubArtifact [-GitHubSecret] <String> [-GitHubOrg] <String> [[-RepoName] <String>]
[[-PageSize] <Int32>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION
This script will remove all artifacts for a single repos or all repos for a given user
EXAMPLES
EXAMPLE 1
Remove-GitHubArtifact -GitHubSecret "ABC" -GitHubOrg "user"
Running this function without specifying a repo will cleanup all artifacts for all repos
EXAMPLE 2
Remove-GitHubArtifact -GitHubSecret "ABC" -GitHubOrg "user" -Repo "RepoName"
Running the script with a specified repo will cleanup all artifacts for that repo
PARAMETERS
-GitHubSecret
Defines the GitHubSecret (API Key) to use
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-GitHubOrg
Defines the GitHub owner user name
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RepoName
Defines a specific repository to remove artifacts for
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PageSize
Optionally specify the PageSize when retreiving repos and artifacts. Valid values are in range of 1..100. Default is 30.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: 4
Default value: 30
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
OUTPUTS
NOTES
RELATED LINKS
https://getps.dev/blog/cleanup-github-artifacts
EDIT THIS DOC
This page was auto-generated from the powershell command comment based help. To edit the content of this page, update the script file comment based help on github Github