< Back

Set-GitPullRequestUrl

Sat Jan 18, 2020 7:51 pm

NAME Set-GitPullRequestUrl



SYNOPSIS

Sets submit pull request page URL in local git config.





SYNTAX

Set-GitPullRequestUrl [[-Url] <Uri>] [<CommonParameters>]





DESCRIPTION

Creates or updates local git config section 'workflow' and sets 'pullrequesturl' key value to the specified URL.





PARAMETERS

-Url <Uri>

Submit pull request page URL.



The URL can be in a form of a template with this placeholders:

{0} - sourceRef

{1} - targetRef



GitHub URL example:

https://github.com/<repo-owner-id>/<ori ... ser-id>:{0}



Visual Studio Online URL example:

https://<my-account-id>.visualstudio.com/_git/<my-repo-id>/pullrequestcreate?sourceRef={0}&targetRef={1}&source

RepositoryId=<my-fork-GUID>&targetRepositoryId=<main-repo-GUID>



Required? false

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Set-GitPullRequestUrl 'https://github.com/octocat/Spoon-Knife/ ... -id:master'













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Set-GitPullRequestUrl 'https://my-account.visualstudio.com/_gi ... f={0}&targ

etRef={1}&sourceRepositoryId=my-fork-repo-GUID&targetRepositoryId=main-repo-GUID'















RELATED LINKS