Skip to content

Require signed commits

Problem to solve

Protected branches in GitLab are implemented differently than in GitHub. For example, in GitHub there are some protected rules that you can apply on one or a few branches that match an expression, while those rules exist in GitLab as a general project settings for all branches. In this issue we make the mapping, so if a protected rule is defined in GH, and similar rule exists in GitLab general settings, we will configure the migrated GitLab project with this rule as a general settings, and this rule will be applied to all branches.

Purposed solution

Scenario: "Require signed commits"
    Given "Require signed commits" a branch protected rule in GitHub checked
    When a user imports this repository to GitLab
    Then the settings "Reject unsigned commits" in the GitLab project settings will be enabled 

Add documentation of this mapping.

Technical details

Get default branch protection rule from Github API. When possible (on Premium and Ultimate GL) look at required_signatures and map its value into project.push_rule attributes.

Edited by Tetiana Zavediuk