Create and apply merge policies

Merge policies control who can merge pull requests. You can create merge policies and apply them to a product, Git repository, or stream/branch.

Note: Merge policies are not the same as merge strategies. Merge strategies apply only to Git repositories and control how pull requests are merged. For details, see Use merge strategies for pull requests.

Create merge policies

As an administrator, you can add custom policies that control who can merge pull requests. Merge policies are created at the space level and apply only within the selected space.

Upgrade note: In PulseUno versions 23.4 and earlier, merge policies (previously named merge rules) were applied globally to all spaces. When you upgrade from version 23.4 or earlier, merge rules are automatically migrated to merge policies that apply to each space at the space level.

To create a merge policy:

  1. On the top navigation bar, select a space from the spaces list.

  2. In the sidebar, select Settings > Merge Policies.

  3. On the Merge Policies page, click New Merge Policy .

  4. On the New Merge Policy page, enter the following details:

    Field Description
    Title Enter a name for the new merge policy.
    Automatically merge To enable pull requests to be merged automatically, select Automatically merge when a pull request is approved. The automatic merge is performed by the repository’s system user in the background.
    Conversations

    Define how pull request conversations affect the merge:

    • Do not verify conversations (default).
    • All pull requests must be Resolved and Accepted.
    • All pull requests must be Resolved.
    Check lists Select All check list items must be checked to enable merging only after all items on the check list are selected.
    Who can merge To display the Merge button in pull requests for specific users, select the author and/or reviewers. These users must have the correct privileges to perform a merge.
    Merge gatekeepers

    To add other users who can see the Merge button, click New . In the Add Merge Gatekeepers dialog box, search for the users you want to add. Select one or more users from the search results and click Add & Continue. Close the dialog box.

    These users must have the correct privileges to perform a merge.

  5. Click Save.

Back to top

Apply merge policies

As an administrator or space owner, you can set a custom merge policy on a product/Git repository or stream/branch.

By default, PulseUno applies the Authors and Reviewers policy, which allows only the author and reviewers of a pull request to manually merge the pull request.

When you select a merge policy for a product or Git repository, the policy applies to all streams/branches in the product. But you can use a different policy in specific streams/branches.

To apply a merge policy for pull requests:

  1. On the top navigation bar, select a space from the spaces list.

  2. On the Products page, open a product or Git repository.

  3. To set a merge policy for a stream/branch, drill down to open the relevant stream/branch.

  4. On the sidebar, select Settings > Reviewing Changes.

  5. In the Pull Requests section, select Use custom merge policy. Then, select a merge policy from the list.

  6. Click Save.

Back to top

See also: