Checks preconditions to determine whether the pull request can be rebased.
Some of the preconditions are:
refs/heads/
git rebase
records the current user as the committer for the rebased commits, which requires a name and e-mail addressThis list is not exhaustive, and the exact set of preconditions applied can be extended by third-party add-ons.
The authenticated user must have REPO_READ permission for the repository that this pull request targets to call this resource.
string
Requiredstring
Requiredstring
RequiredThe rebaseability status of the pull request.
1
2
3
curl --request GET \
--url 'http://{baseurl}/rest/git/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"vetoes": [
{
"detailedMessage": "You have insufficient permissions to rebase 'refs/heads/feature-branch'.",
"summaryMessage": "Insufficient branch permissions"
}
]
}
Rebases the specified pull request, rewriting the incoming commits to start from the tip commit of the pull request's target branch. This operation alters the pull request's source branch and cannot be undone.
The authenticated user must have REPO_READ permission for the repository that this pull request targets and REPO_WRITE permission for the pull request's source repository to call this resource.
string
Requiredstring
Requiredstring
RequiredThe pull request rebase request.
integer
The merged pull request.
1
2
3
4
5
6
7
curl --request POST \
--url 'http://{baseurl}/rest/git/latest/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"version": 1
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
{
"refChange": {
"fromHash": "6053a1eaa1c009dd11092d09a72f3c41af1b59ad",
"toHash": "d6edcbf924697ab811a867421dab60d954ccad99",
"refId": "refs/heads/master",
"type": "ADD",
"ref": {
"displayId": "master",
"id": "refs/heads/master",
"type": "BRANCH"
}
}
}
Creates a tag in the specified repository.
The authenticated user must have an effective REPO_WRITE permission to call this resource.
'LIGHTWEIGHT' and 'ANNOTATED' are the two type of tags that can be created. The 'startPoint' can either be a ref or a 'commit'.
string
Requiredstring
RequiredThe create git tag request.
boolean
string
string
string
string
A JSON representation of the newly created tag.
1
2
3
4
5
6
7
8
9
10
11
curl --request POST \
--url 'http://{baseurl}/rest/git/latest/projects/{projectKey}/repos/{repositorySlug}/tags' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"force": true,
"message": "A new release tag",
"name": "release-tag",
"startPoint": "refs/heads/master",
"type": "ANNOTATED"
}'
1
2
3
4
5
6
7
8
{
"hash": "8d51122def5632836d1cb1026e879069e10a1e13",
"latestCommit": "8d51122def5632836d1cb1026e879069e10a1e13",
"latestChangeset": "8d51122def5632836d1cb1026e879069e10a1e13",
"displayId": "master",
"id": "refs/heads/master",
"type": "BRANCH"
}
Deletes a tag in the specified repository.
The authenticated user must have an effective REPO_WRITE permission to call this resource.
string
Requiredstring
Requiredstring
RequiredAn empty response indicating that the tag no longer exists in the repository.
1
2
curl --request DELETE \
--url 'http://{baseurl}/rest/git/latest/projects/{projectKey}/repos/{repositorySlug}/tags/{name}'
Rate this page: