Skip to content

Track group access level of user importing projects

Problem

At the moment, when users import a project to a group, we don't know what is their role is.

Having this information would help us decide whether restricting imports to Maintainers and above would be a hindrance/breaking-change for many users. We would then be better informed to make decisions related to #358750 (comment 1009208794).

Proposed solution

Let's implement event tracking when a project is imported using structured snowplow events (via GitLab::Tracking.event see https://docs.gitlab.com/ee/development/snowplow/implementation.html#implement-ruby-backend-tracking).

This will require a new event:

category action label user extra
self.class.name create import-access-level current_user {user_role: user_role, import_type: import_type }

Relevant importers:

  • file-based group import (import_group_from_file)
  • file-based project import (gitlab_project)
  • GitHub (github)
  • GitLab Migration (bulk_import_group)
  • Bitbucket (bitbucket)

- [ ] git (git)

gitlab_custom_project_template doesn't need tracking, as it should only be possible for group Owners.

Technical details

See in comment.

Edited by Carla Drago