diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-27 12:10:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-27 12:10:56 +0000 |
commit | 0afd7f18171f70cb8f4296ff9a32381c6919027f (patch) | |
tree | bb06aa12dc2060b987ec581a997b7464dff220a7 /lib | |
parent | f0aaec1f670ca31d6d438556c3b7327699cbe8ef (diff) | |
download | gitlab-ce-0afd7f18171f70cb8f4296ff9a32381c6919027f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/invitations.rb | 1 | ||||
-rw-r--r-- | lib/api/members.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/experimentation.rb | 3 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/invitations.rb b/lib/api/invitations.rb index 0d562cc18f8..acd7f08f96d 100644 --- a/lib/api/invitations.rb +++ b/lib/api/invitations.rb @@ -23,6 +23,7 @@ module API requires :email, types: [String, Array[String]], email_or_email_list: true, desc: 'The email address to invite, or multiple emails separated by comma' requires :access_level, type: Integer, values: Gitlab::Access.all_values, desc: 'A valid access level (defaults: `30`, developer access level)' optional :expires_at, type: DateTime, desc: 'Date string in the format YEAR-MONTH-DAY' + optional :invite_source, type: String, desc: 'Source that triggered the member creation process', default: 'api' end post ":id/invitations" do params[:source] = find_source(source_type, params[:id]) diff --git a/lib/api/members.rb b/lib/api/members.rb index a1a733ea7ae..49241c8d6b2 100644 --- a/lib/api/members.rb +++ b/lib/api/members.rb @@ -93,6 +93,7 @@ module API requires :access_level, type: Integer, desc: 'A valid access level (defaults: `30`, developer access level)' requires :user_id, types: [Integer, String], desc: 'The user ID of the new member or multiple IDs separated by commas.' optional :expires_at, type: DateTime, desc: 'Date string in the format YEAR-MONTH-DAY' + optional :invite_source, type: String, desc: 'Source that triggered the member creation process', default: 'api' end # rubocop: disable CodeReuse/ActiveRecord post ":id/members" do @@ -116,6 +117,7 @@ module API not_allowed! # This currently can only be reached in EE elsif member.valid? && member.persisted? present_members(member) + Gitlab::Tracking.event(::Members::CreateService.name, 'create_member', label: params[:invite_source], property: 'existing_user') else render_validation_error!(member) end diff --git a/lib/gitlab/experimentation.rb b/lib/gitlab/experimentation.rb index be96de85b87..fe3dd4759d6 100644 --- a/lib/gitlab/experimentation.rb +++ b/lib/gitlab/experimentation.rb @@ -45,9 +45,6 @@ module Gitlab remove_known_trial_form_fields: { tracking_category: 'Growth::Conversion::Experiment::RemoveKnownTrialFormFields' }, - invite_members_empty_project_version_a: { - tracking_category: 'Growth::Expansion::Experiment::InviteMembersEmptyProjectVersionA' - }, invite_members_new_dropdown: { tracking_category: 'Growth::Expansion::Experiment::InviteMembersNewDropdown' }, |