forked from mhutchie/vscode-git-graph
-
Notifications
You must be signed in to change notification settings - Fork 10
Configuring a custom Pull Request Provider
Hans Unzner edited this page May 15, 2023
·
1 revision
Custom Pull Request providers can be configured in addition to the built-in public providers (Bitbucket, GitHub & GitLab), so that they can be used with the "Pull Request Creation" Integration.
Extension Setting: git-graph.customPullRequestProviders
Format: An array of Pull Request providers. Each provider is comprised of:
-
name
: A unique, identifying, display name for the provider. -
templateUrl
: A template URL that can be used to create a Pull Request, after the$1
-$8
variables have been substituted to construct the final URL. The variables$1
-$8
are:-
$1
: Host Root URL -
$2
: Source Repository Owner -
$3
: Source Repository Name -
$4
: Source Repository Branch -
$5
: Destination / Target Repository Owner -
$6
: Destination / Target Repository Name -
$7
: Destination / Target Repository Project ID (only used by GitLab) -
$8
: Destination / Target Repository Branch
-
Example Values for the built-in public Pull Request providers:
[
{
"name": "Bitbucket",
"templateUrl": "$1/$2/$3/pull-requests/new?source=$2/$3::$4&dest=$5/$6::$8"
}
]
[
{
"name": "GitHub",
"templateUrl": "$1/$5/$6/compare/$8...$2:$4"
}
]
[
{
"name": "GitLab",
"templateUrl": "$1/$2/$3/-/merge_requests/new?merge_request[source_branch]=$4&merge_request[target_branch]=$8"
}
]