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

Add support for member_role_id #673

Open
adam-moss opened this issue Jan 22, 2024 · 7 comments
Open

Add support for member_role_id #673

adam-moss opened this issue Jan 22, 2024 · 7 comments
Labels
✨feature request gitlab-ultimate This feature would support GitLab Ultimate tiers help wanted

Comments

@adam-moss
Copy link

A clear and concise description of what you want to happen.

Add support for member_role_id in https://github.com/gitlabform/gitlabform/blob/main/gitlabform/gitlab/members.py

This will allow for the configuration of custom roles

Thanks.

@amimas
Copy link
Collaborator

amimas commented Feb 10, 2024

Hey @adam-moss - Shouldn't this be supported already since the member_role_id is just another attribute of group/project members API.

I didn't check the code yet. Since gitlabform follows the raw parameter passing pattern, in theory it should already be supported. I'm not able to validate it. Would you be able to try?

@amimas amimas added ✨feature request gitlab-ultimate This feature would support GitLab Ultimate tiers needs-triage labels Feb 10, 2024
@amimas
Copy link
Collaborator

amimas commented Feb 19, 2024

@adam-moss - did you get a chance to try it out yet?

@adam-moss
Copy link
Author

Hey apologies on the delay in replying. No, it doesn't work as the data variable is hand tooled for those routines not passed directly. We'll contribute the change 👍

@amimas
Copy link
Collaborator

amimas commented Apr 19, 2024

Thank you for verifying. I just took a quick peak at the code for project membership. Looks like "all the data" from the config is not being passed to the API like I had assumed. What's being passed to the API right now is access_level and expires_at...

self.gitlab.edit_member_of_project(
project_and_group, common_username, access_level, expires_at
)
else:
debug(
"Adding user '%s' who previously was not a member.",
common_username,
)
self.gitlab.add_member_to_project(
project_and_group, common_username, access_level, expires_at
)

Looking forward to the update. I guess this will only take care of adding an existing "custom role" as member. Maybe we should open a separate feature request to have gitlabform to manage the custom roles?

@adam-moss
Copy link
Author

Custom roles is, currently, graphql only. Do we have a vision for how that would be integrated?

@amimas
Copy link
Collaborator

amimas commented May 6, 2024

In my opinion, it makes sense that this is available via python-gitlab library. There's an open issue about it too

python-gitlab/python-gitlab#1357

Of course I can't speak for that library. Hopefully maintainers of the library also agree. Even then not sure if they have the capacity to provide that option.

Don't know if there's another equivalent library. The really last option I think would be to just implement it in gitlabform but my suggestion would be to create a separate project that basically builds the library and then consume it here.

@TimKnight-DWP
Copy link
Collaborator

@amimas @adam-moss - I'll look at adding member_role_id into the relevant places on the REST APIs but if we want/need to support creation, then yeah I think adding initial GraphQL support to python-gitlab would probably be the way to go

TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 14, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 21, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 21, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 22, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 22, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 23, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 23, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 23, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 23, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 24, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 24, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 28, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 28, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit to TimKnight-DWP/gitlabform that referenced this issue May 28, 2024
- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to gitlabform#673

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
TimKnight-DWP added a commit that referenced this issue May 29, 2024
… members (#759)

- Adds basic support for custom roles, by allowing Ultimate users
to specify role Ids for their Members
- Creation is NOT supported here
- Relates to #673

---------

Signed-off-by: Tim Knight <tim.knight1@engineering.digital.dwp.gov.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨feature request gitlab-ultimate This feature would support GitLab Ultimate tiers help wanted
Projects
None yet
Development

No branches or pull requests

3 participants