@@ -47,7 +47,6 @@ const ACCESS_LEVEL_OPS = [
4747 'gitlab_add_member' ,
4848 'gitlab_update_member' ,
4949 'gitlab_invite_member' ,
50- 'gitlab_update_invitation' ,
5150 'gitlab_approve_access_request' ,
5251 'gitlab_add_saml_group_link' ,
5352]
@@ -933,6 +932,30 @@ Return ONLY the commit message - no explanations, no extra text.`,
933932 value : ACCESS_LEVEL_OPS ,
934933 } ,
935934 } ,
935+ // Optional access level for Update Invitation. Defaults to "Leave unchanged"
936+ // so updating only the expiration does not silently reset the access level.
937+ {
938+ id : 'invitationAccessLevel' ,
939+ title : 'Access Level' ,
940+ type : 'dropdown' ,
941+ options : [
942+ { label : 'Leave unchanged' , id : '' } ,
943+ { label : 'No access' , id : '0' } ,
944+ { label : 'Minimal Access' , id : '5' } ,
945+ { label : 'Guest' , id : '10' } ,
946+ { label : 'Planner' , id : '15' } ,
947+ { label : 'Reporter' , id : '20' } ,
948+ { label : 'Security Manager' , id : '25' } ,
949+ { label : 'Developer' , id : '30' } ,
950+ { label : 'Maintainer' , id : '40' } ,
951+ { label : 'Owner' , id : '50' } ,
952+ ] ,
953+ value : ( ) => '' ,
954+ condition : {
955+ field : 'operation' ,
956+ value : [ 'gitlab_update_invitation' ] ,
957+ } ,
958+ } ,
936959 // Access expiration date (first-class time-boxed grants)
937960 {
938961 id : 'expiresAt' ,
@@ -1699,7 +1722,11 @@ Return ONLY the commit message - no explanations, no extra text.`,
16991722 resourceType : params . resourceType || 'project' ,
17001723 resourceId : params . resourceId . trim ( ) ,
17011724 email : params . email . trim ( ) ,
1702- accessLevel : params . accessLevel ? Number ( params . accessLevel ) : undefined ,
1725+ // Only send access_level when a level is chosen; "Leave unchanged"
1726+ // ('') keeps the invitation's current level instead of resetting it.
1727+ accessLevel : params . invitationAccessLevel
1728+ ? Number ( params . invitationAccessLevel )
1729+ : undefined ,
17031730 expiresAt : params . expiresAt ?. trim ( ) || undefined ,
17041731 }
17051732
@@ -1919,6 +1946,10 @@ Return ONLY the commit message - no explanations, no extra text.`,
19191946 groupId : { type : 'string' , description : 'Group ID or URL-encoded path' } ,
19201947 userId : { type : 'number' , description : 'Target user ID' } ,
19211948 accessLevel : { type : 'number' , description : 'GitLab access level (10-50)' } ,
1949+ invitationAccessLevel : {
1950+ type : 'string' ,
1951+ description : 'Optional new access level for an invitation ("" leaves it unchanged)' ,
1952+ } ,
19221953 expiresAt : { type : 'string' , description : 'Access expiration date (YYYY-MM-DD)' } ,
19231954 memberRoleId : { type : 'number' , description : 'Custom member role ID (Ultimate)' } ,
19241955 email : { type : 'string' , description : 'Email address for invitations' } ,
0 commit comments