Visitar URL original
MR approval settings Group Level · Issue #3165 · python-gitlab/python-gitlab · GitHub
Skip to content

MR approval settings Group Level #3165

Description

@xakepnz

Group MR approval settings

Feature Request to create the group-mr-approval-settings object on the Group class.

The ability exists over API to query this:

curl --header "PRIVATE-TOKEN: <your_access_token>" \
  --url "https://gitlab.example.com/api/v4/groups/:id/merge_request_approval_setting"
{
  "allow_author_approval": {
    "value": true,
    "locked": false,
    "inherited_from": null
  },
  "allow_committer_approval": {
    "value": true,
    "locked": false,
    "inherited_from": null
  },
  "allow_overrides_to_approver_list_per_merge_request": {
    "value": true,
...

e.g.

>>> group = gl.groups.get('56')
>>> pb = group.merge_request_approval_setting.get()
>>> from pprint import pprint
>>> pprint(pb)
{
  "allow_author_approval": {
    "value": true,
    "locked": false,
    "inherited_from": null
  },
  "allow_committer_approval": {
    "value": true,
    "locked": false,
    "inherited_from": null
  },
  "allow_overrides_to_approver_list_per_merge_request": {
    "value": true,
    "locked": false,
    "inherited_from": null
  },
  "retain_approvals_on_push": {
    "value": true,
    "locked": false,
    "inherited_from": null
...

ref: https://gitlab.com/gitlab-security-oss/cis/gitlabcis/-/issues/125

Specifications

  • python-gitlab version: 5.6.0
  • Gitlab server version (or gitlab.com): GitLab Enterprise Edition 17.11.0-pre 76ac92593a5

Activity

  1. github-actions commented on Jun 25, 2025

    @github-actions

    This issue was marked stale because it has been open 60 days with no activity. Please remove the stale label or comment on this issue. Otherwise, it will be closed in 15 days.
    As an open-source project, we rely on community contributions to address many of the reported issues. Without a proposed fix or active work towards a solution it is our policy to close inactive issues. This is documented in CONTRIBUTING.rst
    How to keep this issue open: * If you are still experiencing this issue and are willing to investigate a fix, please comment and let us know. * If you (or someone else) can propose a pull request with a solution, that would be fantastic. * Any significant update or active discussion indicating progress will also prevent closure.
    We value your input. If you can help provide a fix, we'd be happy to keep this issue open and support your efforts.

  2. guerda commented on Jun 25, 2025

    @guerda

    This feature in Gitlab is - as of now - experimental and must be enabled in the admin settings, but I would request it too.
    Additionally, this should be implemented on the project-level, too, as this is missing yet.

    https://docs.gitlab.com/api/merge_request_approval_settings/#project-mr-approval-settings

  3. xakepnz commented on Jul 1, 2025

    @xakepnz
    ContributorAuthor

    Commenting for the bot to ignore the stale warning.

  4. github-actions commented on Dec 17, 2025

    @github-actions

    This issue was marked stale because it has been open 60 days with
    no activity. Please remove the stale label or comment on this
    issue. Otherwise, it will be closed in 15 days.

    As an open-source project, we rely on community contributions to
    address many of the reported issues. Without a proposed fix or
    active work towards a solution it is our policy to close inactive
    issues. This is documented in CONTRIBUTING.rst

    How to keep this issue open:

    • If you are still experiencing this issue and are willing to
      investigate a fix, please comment and let us know.
    • If you (or someone else) can propose a pull request with a
      solution, that would be fantastic.
    • Any significant update or active discussion indicating progress
      will also prevent closure.

    We value your input. If you can help provide a fix, we'd be happy
    to keep this issue open and support your efforts.

    This is documented in CONTRIBUTING.rst
    https://github.com/python-gitlab/python-gitlab/blob/main/CONTRIBUTING.rst

  5. guerda commented on Dec 17, 2025

    @guerda

    Commenting for the bot to ignore the stale warning.

  6. qerub commented on Dec 18, 2025

    @qerub

    <@guerda> This feature in Gitlab is - as of now - experimental and must be enabled in the admin settings [...]

    What makes you say this is experimental?

    https://docs.gitlab.com/api/merge_request_approval_settings/#group-mr-approval-settings has no note of it being experimental. (Page history: https://gitlab.com/gitlab-org/gitlab/-/commits/master/doc/api/merge_request_approval_settings.md)

    https://docs.gitlab.com/api/merge_request_approvals/#approval-rules-for-groups is experimental, but that's a different thing.

  7. guerda commented on Dec 19, 2025

    @guerda

    What makes you say this is experimental?

    At the time of my comment, the API for getting and setting project merge request approval settings was experimental. A lot can change in 7 months

  8. github-actions commented on Feb 18, 2026

    @github-actions

    This issue was marked stale because it has been open 60 days with
    no activity. Please remove the stale label or comment on this
    issue. Otherwise, it will be closed in 15 days.

    As an open-source project, we rely on community contributions to
    address many of the reported issues. Without a proposed fix or
    active work towards a solution it is our policy to close inactive
    issues. This is documented in CONTRIBUTING.rst

    How to keep this issue open:

    • If you are still experiencing this issue and are willing to
      investigate a fix, please comment and let us know.
    • If you (or someone else) can propose a pull request with a
      solution, that would be fantastic.
    • Any significant update or active discussion indicating progress
      will also prevent closure.

    We value your input. If you can help provide a fix, we'd be happy
    to keep this issue open and support your efforts.

    This is documented in CONTRIBUTING.rst
    https://github.com/python-gitlab/python-gitlab/blob/main/CONTRIBUTING.rst

  9. guerda commented on Feb 18, 2026

    @guerda

    This feature would still be valuable to manage and check group level merge request approval settings

  10. github-actions commented on Apr 20, 2026

    @github-actions

    This issue was marked stale because it has been open 60 days with
    no activity. Please remove the stale label or comment on this
    issue. Otherwise, it will be closed in 15 days.

    As an open-source project, we rely on community contributions to
    address many of the reported issues. Without a proposed fix or
    active work towards a solution it is our policy to close inactive
    issues. This is documented in CONTRIBUTING.rst

    How to keep this issue open:

    • If you are still experiencing this issue and are willing to
      investigate a fix, please comment and let us know.
    • If you (or someone else) can propose a pull request with a
      solution, that would be fantastic.
    • Any significant update or active discussion indicating progress
      will also prevent closure.

    We value your input. If you can help provide a fix, we'd be happy
    to keep this issue open and support your efforts.

    This is documented in CONTRIBUTING.rst
    https://github.com/python-gitlab/python-gitlab/blob/main/CONTRIBUTING.rst

  11. guerda commented on Apr 20, 2026

    @guerda

    This feature request is still very much relevant.

  12. github-actions commented on Jun 20, 2026

    @github-actions

    This issue was marked stale because it has been open 60 days with
    no activity. Please remove the stale label or comment on this
    issue. Otherwise, it will be closed in 15 days.

    As an open-source project, we rely on community contributions to
    address many of the reported issues. Without a proposed fix or
    active work towards a solution it is our policy to close inactive
    issues. This is documented in CONTRIBUTING.rst

    How to keep this issue open:

    • If you are still experiencing this issue and are willing to
      investigate a fix, please comment and let us know.
    • If you (or someone else) can propose a pull request with a
      solution, that would be fantastic.
    • Any significant update or active discussion indicating progress
      will also prevent closure.

    We value your input. If you can help provide a fix, we'd be happy
    to keep this issue open and support your efforts.

    This is documented in CONTRIBUTING.rst
    https://github.com/python-gitlab/python-gitlab/blob/main/CONTRIBUTING.rst

  13. guerda commented on Jun 20, 2026

    @guerda

    I would still like to see this feature, as I manually crafted the API request myself as a workaround.

  14. github-actions commented on Aug 21, 2026

    @github-actions

    This issue was marked stale because it has been open 60 days with
    no activity. Please remove the stale label or comment on this
    issue. Otherwise, it will be closed in 15 days.

    As an open-source project, we rely on community contributions to
    address many of the reported issues. Without a proposed fix or
    active work towards a solution it is our policy to close inactive
    issues. This is documented in CONTRIBUTING.rst

    How to keep this issue open:

    • If you are still experiencing this issue and are willing to
      investigate a fix, please comment and let us know.
    • If you (or someone else) can propose a pull request with a
      solution, that would be fantastic.
    • Any significant update or active discussion indicating progress
      will also prevent closure.

    We value your input. If you can help provide a fix, we'd be happy
    to keep this issue open and support your efforts.

    This is documented in CONTRIBUTING.rst
    https://github.com/python-gitlab/python-gitlab/blob/main/CONTRIBUTING.rst

  15. guerda commented on Aug 21, 2026

    @guerda

    I would still like to see the client supporting the group level merge request settings. Right now I have to send requests manually to the API outside of python-gitlab. Supporting this via the client would be great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions