Improve exported CSV for groupMembersExport GraphQL mutation
Problem to solve
We have a groupMembersExport
GraphQL mutation that exports group members to a CSV:
mutation {
groupMembersExport(input: { groupId: "gid://gitlab/Group/123" }) {
message
errors
}
}
We need to improve the CSV in the following ways:
-
Add a
Group or project name
column to the right of thePath
column. The value should be the name of the group/project, i.e.My Project
. This should not be the full name of the group/project that includes the parent groups, it should just be the name of the group/project itself. -
Change all timestamp columns (Access granted, Access expiration, and Last activity) to ISO format with the full date and time with timezone (UTC timezone).
-
Add a new
Membership status
column to the right of theMembership type
column that shows whether the membership ispending
orapproved
. Pending memberships are members invited by e-mail. -
Remove
(Custom role)
from the role name for custom roles. Add a newRole type
column to the right of theRole
column that shows whether the role isdefault
orcustom
. -
Rename the
Access expired
column toAccess expiration
.
Discussion highlighted that adding the name of group or project to the export would be valuable for auditing.