An add-on for Atlassian Bitbucket Server to check if all commits in the source branch of a pull request have been squashed into a single comment before the merge into the target branch.
The plugin is available in the Atlassian Marketplace and can be installed directly in Bitbucket Server using the Universal Plugin Manager (UPM), see here for details.
Initial release providing the following features:
-
Pull request merge check which checks that all commits in the source branch are merged into a single commit.
New Features:
-
Support to configure the Pull Request settings for a project via the standard Bitbucket REST API. The key is "requiredPullRequestSquash" using "true" or "false as values.
The plugin is integrated into the standard Bitbucket REST API.
In order to get the current setting for a repository execute the following request:
URL: http://example.com/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/settings/pull-requests Method: GET
The settings is saved in the "requiredPullRequestSquash" field.
In order to get the current setting for a repository execute the following request:
URL: http://example.com/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/settings/pull-requests Method: POST Body: {"requiredPullRequestSquash":true}
Copyright 2016 Christian Galsterer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.