Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for new gitlab api features #5985

Closed
1 task done
zhemant opened this issue Feb 13, 2023 · 4 comments · Fixed by #5986
Closed
1 task done

support for new gitlab api features #5985

zhemant opened this issue Feb 13, 2023 · 4 comments · Fixed by #5986
Labels
feature This issue/PR relates to a feature request gitlab has_pr module module plugins plugin (any type) source_control

Comments

@zhemant
Copy link
Contributor

zhemant commented Feb 13, 2023

Summary

Gitlab API has new features added to support enabling/disabling/access control some parts of git repository, they are as follows:

  • releases_access_level: to control the visibility of release tab in web-ui
  • environments_access_level: to control the visibility of environment tab in web-ui
  • feature_flags_access_level: to control the visibility of feature tab in web-ui
  • infrastructure_access_level: to control the visibility of infrastructure tab in web-ui
  • monitor_access_level: to control the visibility of monitoring tab in web-ui
  • security_and_compliance_access_level: to control the visibility of security and compliance tab in web-ui

Issue Type

Feature Idea

Component Name

gitlab_project

Additional Information

Example of project creation using new fields

- name: Setup gitlab project
  community.general.gitlab_project:
    api_url: https://gitlab.example.com/
    validate_certs: true
    api_username: dj-wasabi
    api_password: "MySecretPassword"
    name: my_project
    group: ansible
    releases_access_level: enabled
    environments_access_level: disabled
    feature_flags_access_level: disabled
    infrastructure_access_level: disabled
    monitor_access_level: disabled
    security_and_compliance_access_level: disabled
    state: present
  delegate_to: localhost

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request gitlab module module plugins plugin (any type) source_control labels Feb 13, 2023
@nejch
Copy link
Contributor

nejch commented Feb 13, 2023

This is the kind of cat-and-mouse game with implementing GitLab API attributes that I described in #4577 (comment).

I think it would be easier to do this by transparently passing API params to GitLab and let the server do the validation, but I haven't gotten back to that topic myself.

@zhemant
Copy link
Contributor Author

zhemant commented Feb 13, 2023

I would agree to that as there are quite many fields which are being added as well as deprecated so it would be a hassle to always update it. Allowing direct passing would allow users to use any field which is supported or not supported by gitlab_project

If we should pass directly the attributes, then I would be happy to do a PR with these changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request gitlab has_pr module module plugins plugin (any type) source_control
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants