-
Notifications
You must be signed in to change notification settings - Fork 187
Set GitHubGist
Updates a gist on GitHub.
Set-GitHubGist [-Gist] <String> [-Update <Hashtable>] [-Delete <String[]>] [-Description <String>] [-Force]
[-PassThru] [-AccessToken <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
Updates a gist on GitHub.
The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub
Set-GitHubGist -Gist 6cad326836d38bd3a7ae -Description 'This is my newer description'
Updates the description for the specified gist.
Set-GitHubGist -Gist 6cad326836d38bd3a7ae -Delete 'hello_world.rb' -Force
Deletes the 'hello_world.rb' file from the specified gist without prompting for confirmation.
Set-GitHubGist -Gist 6cad326836d38bd3a7ae -Delete 'hello_world.rb' -Description 'This is my newer description'
Deletes the 'hello_world.rb' file from the specified gist and updates the description.
Set-GitHubGist -Gist 6cad326836d38bd3a7ae -Update @{'hello_world.rb' = @{ 'fileName' = 'hello_universe.rb' }}
Renames the 'hello_world.rb' file in the specified gist to be 'hello_universe.rb'.
Set-GitHubGist -Gist 6cad326836d38bd3a7ae -Update @{'hello_world.rb' = @{ 'fileName' = 'hello_universe.rb' }}
Renames the 'hello_world.rb' file in the specified gist to be 'hello_universe.rb'.
If provided, this will be used as the AccessToken for authentication with the REST Api. Otherwise, will attempt to use the configured value or will run unauthenticated.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
A list of filenames that should be removed from this gist.
Type: System.String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
New description for this gist.
Type: System.String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If this switch is specified, you will not be prompted for confirmation of command execution.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
The ID for the gist to update.
Type: System.String
Parameter Sets: (All)
Aliases: GistId
Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Returns the updated gist. By default, this cmdlet does not generate any output. You can use "Set-GitHubConfiguration -DefaultPassThru" to control the default behavior of this switch.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
A hashtable of files to update in the gist. The key should be the name of the file in the gist as it exists right now. The value should be another hashtable with the following optional key/value pairs: fileName - Specify a new name here if you want to rename the file. filePath - Specify a path to a file on disk if you wish to update the contents of the file in the gist with the contents of the specified file. Should not be specified if you use 'content' (below) content - Directly specify the raw content that the file in the gist should be updated with. Should not be used if you use 'filePath' (above).
Type: System.Collections.Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
[Back to PowerShellForGitHub]
- Add-GitHubAssignee
- Add-GitHubGistStar
- Add-GitHubIssueLabel
- Backup-GitHubConfiguration
- Clear-GitHubAuthentication
- ConvertFrom-GitHubMarkdown
- Copy-GitHubGist
- Disable-GitHubRepositorySecurityFix
- Disable-GitHubRepositoryVulnerabilityAlert
- Enable-GitHubRepositorySecurityFix
- Enable-GitHubRepositoryVulnerabilityAlert
- Get-GitHubAssignee
- Get-GitHubCloneTraffic
- Get-GitHubCodeOfConduct
- Get-GitHubConfiguration
- Get-GitHubContent
- Get-GitHubEmoji
- Get-GitHubEvent
- Get-GitHubGist
- Get-GitHubGistComment
- Get-GitHubGitIgnore
- Get-GitHubIssue
- Get-GitHubIssueComment
- Get-GitHubIssueTimeline
- Get-GitHubLabel
- Get-GitHubLicense
- Get-GitHubMilestone
- Get-GitHubOrganizationMember
- Get-GitHubPathTraffic
- Get-GitHubProject
- Get-GitHubProjectCard
- Get-GitHubProjectColumn
- Get-GitHubPullRequest
- Get-GitHubRateLimit
- Get-GitHubReaction
- Get-GitHubReferrerTraffic
- Get-GitHubRelease
- Get-GitHubReleaseAsset
- Get-GitHubRepository
- Get-GitHubRepositoryActionsPermission
- Get-GitHubRepositoryBranch
- Get-GitHubRepositoryBranchProtectionRule
- Get-GitHubRepositoryCollaborator
- Get-GitHubRepositoryContributor
- Get-GitHubRepositoryFork
- Get-GitHubRepositoryLanguage
- Get-GitHubRepositoryTag
- Get-GitHubRepositoryTeamPermission
- Get-GitHubRepositoryTopic
- Get-GitHubTeam
- Get-GitHubTeamMember
- Get-GitHubUser
- Get-GitHubUserContextualInformation
- Get-GitHubViewTraffic
- Group-GitHubIssue
- Group-GitHubPullRequest
- Initialize-GitHubLabel
- Invoke-GHRestMethod
- Invoke-GHRestMethodMultipleResult
- Join-GitHubUri
- Lock-GitHubIssue
- Move-GitHubProjectCard
- Move-GitHubProjectColumn
- Move-GitHubRepositoryOwnership
- New-GitHubGist
- New-GitHubGistComment
- New-GitHubIssue
- New-GitHubIssueComment
- New-GitHubLabel
- New-GitHubMilestone
- New-GitHubProject
- New-GitHubProjectCard
- New-GitHubProjectColumn
- New-GitHubPullRequest
- New-GitHubRelease
- New-GitHubReleaseAsset
- New-GitHubRepository
- New-GitHubRepositoryBranch
- New-GitHubRepositoryBranchProtectionRule
- New-GitHubRepositoryFork
- New-GitHubRepositoryFromTemplate
- New-GitHubTeam
- Remove-GitHubAssignee
- Remove-GitHubGist
- Remove-GitHubGistComment
- Remove-GitHubGistFile
- Remove-GitHubGistStar
- Remove-GitHubIssueComment
- Remove-GitHubIssueLabel
- Remove-GitHubLabel
- Remove-GitHubMilestone
- Remove-GitHubProject
- Remove-GitHubProjectCard
- Remove-GitHubProjectColumn
- Remove-GitHubReaction
- Remove-GitHubRelease
- Remove-GitHubReleaseAsset
- Remove-GitHubRepository
- Remove-GitHubRepositoryBranch
- Remove-GitHubRepositoryBranchProtectionRule
- Remove-GitHubRepositoryTeamPermission
- Remove-GitHubTeam
- Rename-GitHubGistFile
- Rename-GitHubRepository
- Rename-GitHubTeam
- Reset-GitHubConfiguration
- Restore-GitHubConfiguration
- Set-GitHubAuthentication
- Set-GitHubConfiguration
- Set-GitHubContent
- Set-GitHubGist
- Set-GitHubGistComment
- Set-GitHubGistFile
- Set-GitHubGistStar
- Set-GitHubIssue
- Set-GitHubIssueComment
- Set-GitHubIssueLabel
- Set-GitHubLabel
- Set-GitHubMilestone
- Set-GitHubProfile
- Set-GitHubProject
- Set-GitHubProjectCard
- Set-GitHubProjectColumn
- Set-GitHubReaction
- Set-GitHubRelease
- Set-GitHubReleaseAsset
- Set-GitHubRepository
- Set-GitHubRepositoryActionsPermission
- Set-GitHubRepositoryTeamPermission
- Set-GitHubRepositoryTopic
- Set-GitHubTeam
- Split-GitHubUri
- Test-GitHubAssignee
- Test-GitHubAuthenticationConfigured
- Test-GitHubGistStar
- Test-GitHubOrganizationMember
- Test-GitHubRepositoryVulnerabilityAlert
- Unlock-GitHubIssue