-
Notifications
You must be signed in to change notification settings - Fork 5
Get GHOwnerRepoFromRemoteUrl
gaelcolas edited this page Mar 31, 2026
·
1 revision
Extract GitHub Owner and Repository Name from Uri (ssh or https).
Get-GHOwnerRepoFromRemoteUrl [[-RemoteUrl] <String>] [<CommonParameters>]
This function will look into a remote Url (https:// or ssh://) and will extract the GitHub owner and the repository name.
from https://github.com/PowerShell/vscode-powershell/blob/master/tools/GitHubTools.psm1 Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License.
Get-GHOwnerRepoFromRemoteUrl -RemoteUrl git@github.com:gaelcolas/Sampler.GitHubTasks.git
Remote URL of the repository, you can get it in a cloned repository by doing: git remote get-url origin
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.