WebService::BitbucketServer::Git::V1 - Bindings for a Bitbucket Server REST API
version 0.600
my $stash = WebService::BitbucketServer->new( base_url => 'https://stash.example.com/', username => 'bob', password => 'secret', ); my $api = $stash->git;
This is a Bitbucket Server REST API for Git::V1.
Original API documentation created by and copyright Atlassian.
Get the instance of WebService::BitbucketServer passed to "new".
$api = WebService::BitbucketServer::Git::V1->new(context => $webservice_bitbucketserver_obj);
Create a new API.
Normally you would use $webservice_bitbucketserver_obj->git instead.
$webservice_bitbucketserver_obj->git
Checks preconditions to determine whether the pull request can be rebased.
Some of the preconditions are:
The pull request is between Git repositories
The pull request is currently open
The pull request's "from" ref is a branch
In other words, the qualified ID for the "from" ref must start with refs/heads/
refs/heads/
Tags, and other non-standard refs, cannot be rebased
The current user has an e-mail address
Pull requests cannot be rebased anonymously
git rebase records the current user as the committer for the rebased commits, which requires a name and e-mail address
git rebase
The current user has write access to the "from" ref's repository
Note that in order to view a pull request a user is only required to have read access to the toRef's repository, so just because a user can see a pull request does not mean they can request a rebase
This 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.
GET git/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase
Parameters:
pullRequestId - long, default: none
pullRequestId
the ID of the pull request within the repository
Responses:
200 - pullRequest, type: application/json
200
The rebaseability status of the pull request.
401 - errors, type: application/json
401
The currently authenticated user has insufficient permissions to view the specified pull request.
404 - errors, type: application/json
404
The specified repository or pull request does not exist.
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.
POST git/1.0/projects/{projectKey}/repos/{repositorySlug}/pull-requests/{pullRequestId}/rebase
The merged pull request.
The currently authenticated user has insufficient permissions to view the pull request and/or to update its source branch.
409 - errors, type: application/json
409
Any of the following error cases occurred (check the error message for more details):
The rebase encountered conflicts.
The rebase discarded all of the incoming commits and would have left the pull request empty
A PreRepositoryHook vetoed the rebase.
PreRepositoryHook
The specified version is out of date.
The specified pull request is not open.
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'.
POST git/1.0/projects/{projectKey}/repos/{repositorySlug}/tags
201 - data, type: application/json
201
a JSON representation of the newly created tag
400 - errors, type: application/json
400
the tag was not created because the request was invalid, e.g. the provided ref name already existed in the repository, or was not a valid ref name in the repository, or the start point is invalid
403 - errors, type: application/json
403
The currently authenticated user has insufficient permissions to create a tag. This could be due to insufficient repository permissions.
Deletes a tag in the specified repository.
DELETE git/1.0/projects/{projectKey}/repos/{repositorySlug}/tags/{name:.*}
name - string, default: none
name
the name of the tag to be deleted
the tag was not deleted because repository is either empty, or is not a git repository
204 - data, type: unknown
204
an empty response indicating that the tag no longer exists in the repository
The currently authenticated user has insufficient permissions to delete a tag. This could be due to insufficient repository permissions.
If the tag doesn't exist in the {@link Repository}
WebService::BitbucketServer
https://developer.atlassian.com/bitbucket/server/docs/latest/
Please report any bugs or feature requests on the bugtracker website https://github.com/chazmcgarvey/WebService-BitbucketServer/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Charles McGarvey <ccm@cpan.org>
This software is copyright (c) 2017 by Charles McGarvey.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WebService::BitbucketServer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WebService::BitbucketServer
CPAN shell
perl -MCPAN -e shell install WebService::BitbucketServer
For more information on module installation, please visit the detailed CPAN module installation guide.