Skip to content

Add 'squash_option (never, always, default_on, default_off)' in projects #1744

@svart-riddare

Description

@svart-riddare

Description of the problem, including code/CLI snippet

The "squash_option" gitlab project setting is not available in python object project like other merge options.

Expected Behavior

project = gitlab.projects.get(id)

print('\tMerge method:', project.merge_method)
print('\tRemove source branch after merge:', project.remove_source_branch_after_merge)
print('\tSquash commit when merging:', project.squash_option)
print('\tOnly allow merge if pipeline secceeds:', project.only_allow_merge_if_pipeline_succeeds)
print('\tOnly allow merge if all discussions are resolved:', project.only_allow_merge_if_all_discussions_are_resolved)

Actual Behavior

project = gitlab.projects.get(id)

print('\tMerge method:', project.merge_method)
print('\tRemove source branch after merge:', project.remove_source_branch_after_merge)
print('\tSquash commit when merging:', '???')
print('\tOnly allow merge if pipeline secceeds:', project.only_allow_merge_if_pipeline_succeeds)
print('\tOnly allow merge if all discussions are resolved:', project.only_allow_merge_if_all_discussions_are_resolved)

Specifications

  • python-gitlab version: 2.10.1
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): gitlab enterprise edition 13.11.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions