An open API service indexing awesome lists of open source software.

https://github.com/christiangalsterer/bitbucket-prsquash-plugin

Pull Request Squash
https://github.com/christiangalsterer/bitbucket-prsquash-plugin

atlassian atlassian-bitbucket bitbucket bitbucket-server

Last synced: over 1 year ago
JSON representation

Pull Request Squash

Awesome Lists containing this project

README

          

= Introduction

An add-on for https://www.atlassian.com/software/bitbucket/server[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.

= Installation

The plugin is available in the https://marketplace.atlassian.com/plugins/org.christiangalsterer.bitbucket-prsquash-plugin[Atlassian Marketplace] and can be installed directly in Bitbucket Server using the Universal Plugin Manager (UPM), see https://marketplace.atlassian.com/plugins/org.christiangalsterer.bitbucket-prsquash-plugin#tabs-installation[here] for details.

= Releases

== 1.0.0 (2016-10-30)
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.

== 1.1.0 (2016-11-05)
New Features:

* Support to configure the Pull Request settings for a project via the standard https://developer.atlassian.com/bitbucket/server/docs/latest/how-tos/command-line-rest.html[Bitbucket REST API]. The key is "requiredPullRequestSquash" using "true" or "false as values.

= Documentation

== REST API

The plugin is integrated into the standard Bitbucket REST API.

=== Get PR Squash Setting for a repository
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.

=== Set PR Squash Setting for a repository
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}

= License

[source]
----
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.
----