Skip to content

Set GitHubGistStar

Howard Wolosky edited this page Oct 5, 2020 · 1 revision

Set-GitHubGistStar

SYNOPSIS

Changes the starred state of a gist on GitHub for the current authenticated user.

SYNTAX

Set-GitHubGistStar [-Gist] <String> [-Star] [-AccessToken <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Changes the starred state of a gist on GitHub for the current authenticated user.

The Git repo for this module can be found here: http://aka.ms/PowerShellForGitHub

EXAMPLES

EXAMPLE 1

Set-GitHubGistStar -Gist 6cad326836d38bd3a7ae -Star

Stars octocat's "hello_world.rb" gist.

EXAMPLE 2

Set-GitHubGistStar -Gist 6cad326836d38bd3a7ae

Unstars octocat's "hello_world.rb" gist.

EXAMPLE 3

Get-GitHubGist -Gist 6cad326836d38bd3a7ae | Set-GitHubGistStar -Star:$false

Unstars octocat's "hello_world.rb" gist.

PARAMETERS

-AccessToken

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

-Gist

The ID of the specific Gist that you wish to change the starred state for.

Type: System.String
Parameter Sets: (All)
Aliases: GistId

Required: True
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Star

Include this switch to star the gist. Exclude the switch (or use -Star:$false) to remove the star.

Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

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

-WhatIf

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

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

GitHub.Gist

GitHub.GistComment

GitHub.GistCommit

GitHub.GistFork

GitHub.GistSummary

OUTPUTS

NOTES

RELATED LINKS

PowerShellForGitHub

Docs

PowerShellForGitHub

Functions

Clone this wiki locally