idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
158,300 | public List < Project > getForks ( Object projectIdOrPath ) throws GitLabApiException { return ( getForks ( projectIdOrPath , getDefaultPerPage ( ) ) . all ( ) ) ; } | Get a list of projects that were forked from the specified project . |
158,301 | public List < Project > getForks ( Object projectIdOrPath , int page , int perPage ) throws GitLabApiException { Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "forks" ) ; return ( response . readEntity ( new GenericType <... | Get a list of projects that were forked from the specified project and in the specified page range . |
158,302 | public Pager < Project > getForks ( Object projectIdOrPath , int itemsPerPage ) throws GitLabApiException { return new Pager < Project > ( this , Project . class , itemsPerPage , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "forks" ) ; } | Get a Pager of projects that were forked from the specified project . |
158,303 | public Stream < Project > getForksStream ( Object projectIdOrPath ) throws GitLabApiException { return ( getForks ( projectIdOrPath , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get a Stream of projects that were forked from the specified project . |
158,304 | public Project starProject ( Object projectIdOrPath ) throws GitLabApiException { Response . Status expectedStatus = ( isApiVersion ( ApiVersion . V3 ) ? Response . Status . OK : Response . Status . CREATED ) ; Response response = post ( expectedStatus , ( Form ) null , "projects" , getProjectIdOrPath ( projectIdOrPath... | Star a project . |
158,305 | public Map < String , Float > getProjectLanguages ( Object projectIdOrPath ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "languages" ) ; return ( response . readEntity ( new GenericType < Map < String , Float > > ( ) { } ) )... | Get languages used in a project with percentage value . |
158,306 | public Project transferProject ( Object projectIdOrPath , String namespace ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "namespace" , namespace , true ) ; Response response = put ( Response . Status . OK , formData . asMap ( ) , "projects" , getProjectIdOrPath ( projectIdOr... | Transfer a project to a new namespace . This was added in GitLab 11 . 1 |
158,307 | public Project setProjectAvatar ( Object projectIdOrPath , File avatarFile ) throws GitLabApiException { Response response = putUpload ( Response . Status . OK , "avatar" , avatarFile , "projects" , getProjectIdOrPath ( projectIdOrPath ) ) ; return ( response . readEntity ( Project . class ) ) ; } | Uploads and sets the project avatar for the specified project . |
158,308 | public List < Variable > getVariables ( Object projectIdOrPath ) throws GitLabApiException { return ( getVariables ( projectIdOrPath , getDefaultPerPage ( ) ) . all ( ) ) ; } | Get list of a project s variables . |
158,309 | public List < Variable > getVariables ( Object projectIdOrPath , int page , int perPage ) throws GitLabApiException { Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "variables" ) ; return ( response . readEntity ( new Gene... | Get a list of variables for the specified project in the specified page range . |
158,310 | public Pager < Variable > getVariables ( Object projectIdOrPath , int itemsPerPage ) throws GitLabApiException { return ( new Pager < Variable > ( this , Variable . class , itemsPerPage , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "variables" ) ) ; } | Get a Pager of variables belonging to the specified project . |
158,311 | public Stream < Variable > getVariablesStream ( Object projectIdOrPath ) throws GitLabApiException { return ( getVariables ( projectIdOrPath , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get a Stream of variables belonging to the specified project . |
158,312 | public Variable getVariable ( Object projectIdOrPath , String key ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "variables" , key ) ; return ( response . readEntity ( Variable . class ) ) ; } | Get the details of a project variable . |
158,313 | public Variable updateVariable ( Object projectIdOrPath , String key , String value , Boolean isProtected , String environmentScope ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "value" , value , true ) . withParam ( "protected" , isProtected ) . withParam ( "environment_sco... | Update a project variable . |
158,314 | public void deleteVariable ( Object projectIdOrPath , String key ) throws GitLabApiException { delete ( Response . Status . NO_CONTENT , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "variables" , key ) ; } | Deletes a project variable . |
158,315 | public static String getShortRequestDump ( String fromMethod , HttpServletRequest request ) { return ( getShortRequestDump ( fromMethod , false , request ) ) ; } | Build a String containing a very short multi - line dump of an HTTP request . |
158,316 | public static String getShortRequestDump ( String fromMethod , boolean includeHeaders , HttpServletRequest request ) { StringBuilder dump = new StringBuilder ( ) ; dump . append ( "Timestamp : " ) . append ( ISO8601 . getTimestamp ( ) ) . append ( "\n" ) ; dump . append ( "fromMethod : " ) . append ( fromMethod ... | Build a String containing a short multi - line dump of an HTTP request . |
158,317 | public static String getRequestDump ( String fromMethod , HttpServletRequest request , boolean includePostData ) { String shortDump = getShortRequestDump ( fromMethod , request ) ; StringBuilder buf = new StringBuilder ( shortDump ) ; try { buf . append ( "\nAttributes:\n" ) ; Enumeration < String > attrs = request . g... | Build a String containing a multi - line dump of an HTTP request . |
158,318 | public static String getPostDataAsString ( HttpServletRequest request ) throws IOException { try ( InputStreamReader reader = new InputStreamReader ( request . getInputStream ( ) , "UTF-8" ) ) { return ( getReaderContentAsString ( reader ) ) ; } } | Reads the POST data from a request into a String and returns it . |
158,319 | public static String getReaderContentAsString ( Reader reader ) throws IOException { int count ; final char [ ] buffer = new char [ 2048 ] ; final StringBuilder out = new StringBuilder ( ) ; while ( ( count = reader . read ( buffer , 0 , buffer . length ) ) >= 0 ) { out . append ( buffer , 0 , count ) ; } return ( out ... | Reads the content of a Reader instance and returns it as a String . |
158,320 | public void encodeAndSetContent ( String content ) { encodeAndSetContent ( content != null ? content . getBytes ( ) : null ) ; } | Encodes the provided String using Base64 and sets it as the content . The encoding property of this instance will be set to base64 . |
158,321 | public void encodeAndSetContent ( byte [ ] byteContent ) { if ( byteContent == null ) { this . content = null ; return ; } this . content = Base64 . getEncoder ( ) . encodeToString ( byteContent ) ; encoding = "base64" ; } | Encodes the provided byte array using Base64 and sets it as the content . The encoding property of this instance will be set to base64 . |
158,322 | public List < WikiPage > getPages ( Object projectIdOrPath , int page , int perPage ) throws GitLabApiException { Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "wikis" ) ; return response . readEntity ( new GenericType < ... | Get a list of pages in project wiki for the specified page . |
158,323 | public WikiPage getPage ( Object projectIdOrPath , String slug ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "wikis" , slug ) ; return ( response . readEntity ( WikiPage . class ) ) ; } | Get a single page of project wiki . |
158,324 | public Optional < WikiPage > getOptionalPage ( Object projectIdOrPath , String slug ) { try { return ( Optional . ofNullable ( getPage ( projectIdOrPath , slug ) ) ) ; } catch ( GitLabApiException glae ) { return ( GitLabApi . createOptionalFromException ( glae ) ) ; } } | Get a single page of project wiki as an Optional instance . |
158,325 | public WikiPage createPage ( Object projectIdOrPath , String title , String content ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "title" , title ) . withParam ( "content" , content ) ; Response response = post ( Response . Status . CREATED , formData , "projects" , getProje... | Creates a new project wiki page . The user must have permission to create new wiki page . |
158,326 | public WikiPage updatePage ( Object projectIdOrPath , String slug , String title , String content ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "title" , title ) . withParam ( "slug" , slug , true ) . withParam ( "content" , content ) ; Response response = put ( Response . S... | Updates an existing project wiki page . The user must have permission to change an existing wiki page . |
158,327 | public void deletePage ( Object projectIdOrPath , String slug ) throws GitLabApiException { delete ( Response . Status . NO_CONTENT , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "wikis" , slug ) ; } | Deletes an existing project wiki page . This is an idempotent function and deleting a non - existent page does not cause an error . |
158,328 | public List < ProtectedBranch > getProtectedBranches ( Object projectIdOrPath ) throws GitLabApiException { return ( getProtectedBranches ( projectIdOrPath , this . getDefaultPerPage ( ) ) . all ( ) ) ; } | Gets a list of protected branches from a project . |
158,329 | public Pager < ProtectedBranch > getProtectedBranches ( Object projectIdOrPath , int itemsPerPage ) throws GitLabApiException { return ( new Pager < ProtectedBranch > ( this , ProtectedBranch . class , itemsPerPage , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "protected_branches" ) ) ; } | Gets a Pager of protected branches from a project . |
158,330 | public Stream < ProtectedBranch > getProtectedBranchesStream ( Object projectIdOrPath ) throws GitLabApiException { return ( getProtectedBranches ( projectIdOrPath , this . getDefaultPerPage ( ) ) . stream ( ) ) ; } | Gets a Stream of protected branches from a project . |
158,331 | public void unprotectBranch ( Integer projectIdOrPath , String branchName ) throws GitLabApiException { delete ( Response . Status . NO_CONTENT , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "protected_branches" , urlEncode ( branchName ) ) ; } | Unprotects the given protected branch or wildcard protected branch . |
158,332 | public List < Commit > getCommits ( Object projectIdOrPath , String ref , String path ) throws GitLabApiException { return ( getCommits ( projectIdOrPath , ref , null , null , path , getDefaultPerPage ( ) ) . all ( ) ) ; } | Get a list of file commits in a project |
158,333 | public Pager < Commit > getCommits ( Object projectIdOrPath , String ref , Date since , Date until , String path , int itemsPerPage ) throws GitLabApiException { Form formData = new GitLabApiForm ( ) . withParam ( "ref_name" , ref ) . withParam ( "since" , ISO8601 . toString ( since , false ) ) . withParam ( "until" , ... | Get a Pager of repository commits in a project |
158,334 | public Commit getCommit ( Object projectIdOrPath , String sha ) throws GitLabApiException { Response response = get ( Response . Status . OK , getDefaultPerPageParam ( ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "repository" , "commits" , urlEncode ( sha ) ) ; return ( response . readEntity ( Commit . cla... | Get a specific commit identified by the commit hash or name of a branch or tag . |
158,335 | public Pager < CommitStatus > getCommitStatuses ( Object projectIdOrPath , String sha , CommitStatusFilter filter , int itemsPerPage ) throws GitLabApiException { if ( projectIdOrPath == null ) { throw new RuntimeException ( "projectIdOrPath cannot be null" ) ; } if ( sha == null || sha . trim ( ) . isEmpty ( ) ) { thr... | Get a Pager of repository commit statuses that meet the provided filter . |
158,336 | public Stream < CommitStatus > getCommitStatusesStream ( Object projectIdOrPath , String sha , CommitStatusFilter filter ) throws GitLabApiException { return ( getCommitStatuses ( projectIdOrPath , sha , filter , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get a Stream of repository commit statuses that meet the provided filter . |
158,337 | public List < Diff > getDiff ( Object projectIdOrPath , String sha ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "repository" , "commits" , sha , "diff" ) ; return ( response . readEntity ( new GenericType < List < Diff > > ... | Get the list of diffs of a commit in a project . |
158,338 | public List < Comment > getComments ( Object projectIdOrPath , String sha ) throws GitLabApiException { return ( getComments ( projectIdOrPath , sha , getDefaultPerPage ( ) ) . all ( ) ) ; } | Get the comments of a commit in a project . |
158,339 | public Pager < Comment > getComments ( Object projectIdOrPath , String sha , int itemsPerPage ) throws GitLabApiException { return new Pager < Comment > ( this , Comment . class , itemsPerPage , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "repository" , "commits" , sha , "comments" ) ; } | Get a Pager of the comments of a commit in a project . |
158,340 | public Stream < Comment > getCommentsStream ( Object projectIdOrPath , String sha ) throws GitLabApiException { return ( getComments ( projectIdOrPath , sha , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get the comments of a commit in a project as a Stream . |
158,341 | public Comment addComment ( Object projectIdOrPath , String sha , String note , String path , Integer line , LineType lineType ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "note" , note , true ) . withParam ( "path" , path ) . withParam ( "line" , line ) . withParam ( "line... | Add a comment to a commit . In order to post a comment in a particular line of a particular file you must specify the full commit SHA the path the line and lineType should be NEW . |
158,342 | public Comment addComment ( Object projectIdOrPath , String sha , String note ) throws GitLabApiException { return ( addComment ( projectIdOrPath , sha , note , null , null , null ) ) ; } | Add a comment to a commit . |
158,343 | public Commit createCommit ( Object projectIdOrPath , String branch , String commitMessage , String startBranch , String authorEmail , String authorName , List < CommitAction > actions ) throws GitLabApiException { CommitPayload payload = new CommitPayload ( ) ; payload . setBranch ( branch ) ; payload . setCommitMessa... | Create a commit with multiple files and actions . |
158,344 | public NotificationSettings getGlobalNotificationSettings ( ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "notification_settings" ) ; return ( response . readEntity ( NotificationSettings . class ) ) ; } | Get the global notification settings . |
158,345 | public NotificationSettings updateGlobalNotificationSettings ( NotificationSettings settings ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "level" , settings . getLevel ( ) ) . withParam ( "email" , settings . getEmail ( ) ) ; Events events = settings . getEvents ( ) ; if ( ... | Update the global notification settings . |
158,346 | public NotificationSettings getGroupNotificationSettings ( int groupId ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "groups" , groupId , "notification_settings" ) ; return ( response . readEntity ( NotificationSettings . class ) ) ; } | Get the notification settings for a group . |
158,347 | public NotificationSettings getProjectNotificationSettings ( int projectId ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "projects" , projectId , "notification_settings" ) ; return ( response . readEntity ( NotificationSettings . class ) ) ; } | Get the notification settings for a project . |
158,348 | public void addEnum ( E e , String name ) { valuesMap . put ( name , e ) ; namesMap . put ( e , name ) ; } | Add an enum that has a specialized name that does not fit the standard naming conventions . |
158,349 | public Session login ( String username , String email , String password ) throws GitLabApiException { if ( ( username == null || username . trim ( ) . length ( ) == 0 ) && ( email == null || email . trim ( ) . length ( ) == 0 ) ) { throw new IllegalArgumentException ( "both username and email cannot be empty or null" )... | Login to get private token . This functionality is not available on GitLab servers 10 . 2 and above . |
158,350 | public Markdown getMarkdown ( String text ) throws GitLabApiException { if ( ! isApiVersion ( ApiVersion . V4 ) ) { throw new GitLabApiException ( "Api version must be v4" ) ; } Form formData = new GitLabApiForm ( ) . withParam ( "text" , text , true ) ; Response response = post ( Response . Status . OK , formData . as... | Render an arbitrary Markdown document . |
158,351 | public static String getFilenameFromContentDisposition ( Response response ) { String disposition = response . getHeaderString ( "Content-Disposition" ) ; if ( disposition == null || disposition . trim ( ) . length ( ) == 0 ) return ( null ) ; return ( disposition . replaceFirst ( "(?i)^.*filename=\"([^\"]+)\".*$" , "$... | Get the filename from the Content - Disposition header of a JAX - RS response . |
158,352 | public static String readFileContents ( File file ) throws IOException { try ( Scanner in = new Scanner ( file ) ) { in . useDelimiter ( "\\Z" ) ; return ( in . next ( ) ) ; } } | Reads the contents of a File to a String . |
158,353 | public Stream < Group > getGroupsStream ( String search ) throws GitLabApiException { return ( getGroups ( search , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get all groups that match your string in their name or path as a Stream . |
158,354 | public List < Group > getGroups ( GroupFilter filter ) throws GitLabApiException { return ( getGroups ( filter , getDefaultPerPage ( ) ) . all ( ) ) ; } | Get a list of visible groups for the authenticated user using the provided filter . |
158,355 | public Pager < Group > getGroups ( GroupFilter filter , int itemsPerPage ) throws GitLabApiException { GitLabApiForm formData = filter . getQueryParams ( ) ; return ( new Pager < Group > ( this , Group . class , itemsPerPage , formData . asMap ( ) , "groups" ) ) ; } | Get a Pager of visible groups for the authenticated user using the provided filter . |
158,356 | public Stream < Group > getGroupsStream ( GroupFilter filter ) throws GitLabApiException { return ( getGroups ( filter , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get a Stream of visible groups for the authenticated user using the provided filter . |
158,357 | public Stream < Group > getSubGroupsStream ( Object groupIdOrPath ) throws GitLabApiException { return ( getSubGroups ( groupIdOrPath , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get a Stream of visible direct subgroups in this group . |
158,358 | public Pager < Project > getProjects ( Object groupIdOrPath , GroupProjectsFilter filter , int itemsPerPage ) throws GitLabApiException { GitLabApiForm formData = filter . getQueryParams ( ) ; return ( new Pager < Project > ( this , Project . class , itemsPerPage , formData . asMap ( ) , "groups" , getGroupIdOrPath ( g... | Get a Pager of projects belonging to the specified group ID and filter . |
158,359 | public Stream < Project > getProjectsStream ( Object groupIdOrPath , GroupProjectsFilter filter ) throws GitLabApiException { return ( getProjects ( groupIdOrPath , filter , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get a Stream of projects belonging to the specified group ID and filter . |
158,360 | public List < Project > getProjects ( Object groupIdOrPath ) throws GitLabApiException { return ( getProjects ( groupIdOrPath , getDefaultPerPage ( ) ) . all ( ) ) ; } | Get a list of projects belonging to the specified group ID . |
158,361 | public List < Project > getProjects ( Object groupIdOrPath , int page , int perPage ) throws GitLabApiException { Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "projects" ) ; return ( response . readEntity ( new GenericType < L... | Get a list of projects belonging to the specified group ID in the specified page range . |
158,362 | public Pager < Project > getProjects ( Object groupIdOrPath , int itemsPerPage ) throws GitLabApiException { return ( new Pager < Project > ( this , Project . class , itemsPerPage , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "projects" ) ) ; } | Get a Pager of projects belonging to the specified group ID . |
158,363 | public Group getGroup ( Object groupIdOrPath ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) ) ; return ( response . readEntity ( Group . class ) ) ; } | Get all details of a group . |
158,364 | public Optional < Group > getOptionalGroup ( Object groupIdOrPath ) { try { return ( Optional . ofNullable ( getGroup ( groupIdOrPath ) ) ) ; } catch ( GitLabApiException glae ) { return ( GitLabApi . createOptionalFromException ( glae ) ) ; } } | Get all details of a group as an Optional instance . |
158,365 | public void deleteGroup ( Object groupIdOrPath ) throws GitLabApiException { Response . Status expectedStatus = ( isApiVersion ( ApiVersion . V3 ) ? Response . Status . OK : Response . Status . NO_CONTENT ) ; delete ( expectedStatus , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) ) ; } | Removes group with all projects inside . |
158,366 | public List < Member > getMembers ( Object groupIdOrPath ) throws GitLabApiException { return ( getMembers ( groupIdOrPath , getDefaultPerPage ( ) ) . all ( ) ) ; } | Get a list of group members viewable by the authenticated user . |
158,367 | public List < Member > getMembers ( Object groupIdOrPath , int page , int perPage ) throws GitLabApiException { Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "members" ) ; return ( response . readEntity ( new GenericType < List... | Get a list of group members viewable by the authenticated user in the specified page range . |
158,368 | public Pager < Member > getMembers ( Object groupIdOrPath , int itemsPerPage ) throws GitLabApiException { return ( new Pager < Member > ( this , Member . class , itemsPerPage , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "members" ) ) ; } | Get a Pager of group members viewable by the authenticated user . |
158,369 | public Stream < Member > getMembersStream ( Object groupIdOrPath ) throws GitLabApiException { return ( getMembers ( groupIdOrPath , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get a Stream of group members viewable by the authenticated user . |
158,370 | public Member getMember ( Object groupIdOrPath , int userId ) throws GitLabApiException { Response response = get ( Response . Status . OK , getDefaultPerPageParam ( ) , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "members" , userId ) ; return ( response . readEntity ( new GenericType < Member > ( ) { } ) ) ; } | Get a group member viewable by the authenticated user . |
158,371 | public Optional < Member > getOptionalMember ( Object groupIdOrPath , int userId ) { try { return ( Optional . ofNullable ( getMember ( groupIdOrPath , userId ) ) ) ; } catch ( GitLabApiException glae ) { return ( GitLabApi . createOptionalFromException ( glae ) ) ; } } | Get a group member viewable by the authenticated user as an Optional instance . |
158,372 | public void removeMember ( Object groupIdOrPath , Integer userId ) throws GitLabApiException { Response . Status expectedStatus = ( isApiVersion ( ApiVersion . V3 ) ? Response . Status . OK : Response . Status . NO_CONTENT ) ; delete ( expectedStatus , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "members" , ... | Removes member from the group . |
158,373 | public void ldapSync ( Object groupIdOrPath ) throws GitLabApiException { post ( Response . Status . NO_CONTENT , ( Form ) null , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "ldap_sync" ) ; } | Syncs the group with its linked LDAP group . Only available to group owners and administrators . |
158,374 | public void deleteLdapGroupLink ( Object groupIdOrPath , String cn ) throws GitLabApiException { if ( cn == null || cn . trim ( ) . isEmpty ( ) ) { throw new RuntimeException ( "cn cannot be null or empty" ) ; } delete ( Response . Status . OK , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "ldap_group_links" ... | Deletes an LDAP group link . |
158,375 | public void deleteLdapGroupLink ( Object groupIdOrPath , String cn , String provider ) throws GitLabApiException { if ( cn == null || cn . trim ( ) . isEmpty ( ) ) { throw new RuntimeException ( "cn cannot be null or empty" ) ; } if ( provider == null || provider . trim ( ) . isEmpty ( ) ) { throw new RuntimeException ... | Deletes an LDAP group link for a specific LDAP provider . |
158,376 | public List < Variable > getVariables ( Object groupIdOrPath , int page , int perPage ) throws GitLabApiException { Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "variables" ) ; return ( response . readEntity ( new GenericType ... | Get a list of variables for the specified group in the specified page range . |
158,377 | public Pager < Variable > getVariables ( Object groupIdOrPath , int itemsPerPage ) throws GitLabApiException { return ( new Pager < Variable > ( this , Variable . class , itemsPerPage , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "variables" ) ) ; } | Get a Pager of variables belonging to the specified group . |
158,378 | public Stream < Variable > getVariablesStream ( Object groupIdOrPath ) throws GitLabApiException { return ( getVariables ( groupIdOrPath , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get a Stream of variables belonging to the specified group . |
158,379 | public Variable getVariable ( Object groupIdOrPath , String key ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "variables" , key ) ; return ( response . readEntity ( Variable . class ) ) ; } | Get the details of a group variable . |
158,380 | public Optional < Variable > getOptionalVariable ( Object groupIdOrPath , String key ) { try { return ( Optional . ofNullable ( getVariable ( groupIdOrPath , key ) ) ) ; } catch ( GitLabApiException glae ) { return ( GitLabApi . createOptionalFromException ( glae ) ) ; } } | Get the details of a group variable as an Optional instance . |
158,381 | public Variable createVariable ( Object groupIdOrPath , String key , String value , Boolean isProtected ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "key" , key , true ) . withParam ( "value" , value , true ) . withParam ( "protected" , isProtected ) ; Response response = p... | Create a new group variable . |
158,382 | public void deleteVariable ( Object groupIdOrPath , String key ) throws GitLabApiException { delete ( Response . Status . NO_CONTENT , null , "groups" , getGroupIdOrPath ( groupIdOrPath ) , "variables" , key ) ; } | Deletes a group variable . |
158,383 | public List < Snippet > getSnippets ( boolean downloadContent ) throws GitLabApiException { Response response = get ( Response . Status . OK , getDefaultPerPageParam ( ) , "snippets" ) ; List < Snippet > snippets = ( response . readEntity ( new GenericType < List < Snippet > > ( ) { } ) ) ; if ( downloadContent ) { for... | Get a list of the authenticated user s snippets . |
158,384 | public Pager < Snippet > getSnippets ( int itemsPerPage ) throws GitLabApiException { return ( new Pager < Snippet > ( this , Snippet . class , itemsPerPage , null , "snippets" ) ) ; } | Get a Pager of the authenticated user s snippets . |
158,385 | public String getSnippetContent ( Integer snippetId ) throws GitLabApiException { Response response = get ( Response . Status . OK , null , "snippets" , snippetId , "raw" ) ; return ( response . readEntity ( String . class ) ) ; } | Get the content of a Snippet . |
158,386 | public Snippet getSnippet ( Integer snippetId , boolean downloadContent ) throws GitLabApiException { if ( snippetId == null ) { throw new RuntimeException ( "snippetId can't be null" ) ; } Response response = get ( Response . Status . OK , null , "snippets" , snippetId ) ; Snippet snippet = response . readEntity ( Sni... | Get a specific Snippet . |
158,387 | public Optional < Snippet > getOptionalSnippet ( Integer snippetId , boolean downloadContent ) { try { return ( Optional . ofNullable ( getSnippet ( snippetId , downloadContent ) ) ) ; } catch ( GitLabApiException glae ) { return ( GitLabApi . createOptionalFromException ( glae ) ) ; } } | Get a specific snippet as an Optional instance . |
158,388 | public Snippet createSnippet ( String title , String fileName , String content ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "title" , title , true ) . withParam ( "file_name" , fileName , true ) . withParam ( "content" , content , true ) ; Response response = post ( Respons... | Create a new Snippet . |
158,389 | public void deleteSnippet ( Integer snippetId ) throws GitLabApiException { if ( snippetId == null ) { throw new RuntimeException ( "snippetId can't be null" ) ; } delete ( Response . Status . NO_CONTENT , null , "snippets" , snippetId ) ; } | Removes Snippet . |
158,390 | public List < DeployKey > getDeployKeys ( int page , int perPage ) throws GitLabApiException { Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "deploy_keys" ) ; return ( response . readEntity ( new GenericType < List < DeployKey > > ( ) { } ) ) ; } | Get a list of all deploy keys across all projects of the GitLab instance using the specified page and per page settings . This method requires admin access . |
158,391 | public Pager < DeployKey > getDeployKeys ( int itemsPerPage ) throws GitLabApiException { return ( new Pager < DeployKey > ( this , DeployKey . class , itemsPerPage , null , "deploy_keys" ) ) ; } | Get a Pager of all deploy keys across all projects of the GitLab instance . This method requires admin access . |
158,392 | public List < DeployKey > getProjectDeployKeys ( Object projectIdOrPath , int page , int perPage ) throws GitLabApiException { Response response = get ( Response . Status . OK , getPageQueryParams ( page , perPage ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "deploy_keys" ) ; return ( response . readEntity... | Get a list of the deploy keys for the specified project using the specified page and per page settings . This method requires admin access . |
158,393 | public Pager < DeployKey > getProjectDeployKeys ( Object projectIdOrPath , int itemsPerPage ) throws GitLabApiException { return ( new Pager < DeployKey > ( this , DeployKey . class , itemsPerPage , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "deploy_keys" ) ) ; } | Get a Pager of the deploy keys for the specified project . This method requires admin access . |
158,394 | public DeployKey getDeployKey ( Object projectIdOrPath , Integer keyId ) throws GitLabApiException { if ( keyId == null ) { throw new RuntimeException ( "keyId cannot be null" ) ; } Response response = get ( Response . Status . OK , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "deploy_keys" , keyId ) ; ... | Get a single deploy key for the specified project . |
158,395 | public Optional < DeployKey > getOptionalDeployKey ( Object projectIdOrPath , Integer keyId ) { try { return ( Optional . ofNullable ( getDeployKey ( projectIdOrPath , keyId ) ) ) ; } catch ( GitLabApiException glae ) { return ( GitLabApi . createOptionalFromException ( glae ) ) ; } } | Get a single deploy key for the specified project as an Optional instance . |
158,396 | public DeployKey addDeployKey ( Object projectIdOrPath , String title , String key , Boolean canPush ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "title" , title , true ) . withParam ( "key" , key , true ) . withParam ( "can_push" , canPush ) ; Response response = post ( Re... | Creates a new deploy key for a project . |
158,397 | public void deleteDeployKey ( Object projectIdOrPath , Integer keyId ) throws GitLabApiException { if ( keyId == null ) { throw new RuntimeException ( "keyId cannot be null" ) ; } delete ( Response . Status . OK , null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "deploy_keys" , keyId ) ; } | Removes a deploy key from the project . If the deploy key is used only for this project it will be deleted from the system . |
158,398 | public DeployKey enableDeployKey ( Object projectIdOrPath , Integer keyId ) throws GitLabApiException { if ( keyId == null ) { throw new RuntimeException ( "keyId cannot be null" ) ; } Response response = post ( Response . Status . CREATED , ( Form ) null , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "deploy_... | Enables a deploy key for a project so this can be used . Returns the enabled key when successful . |
158,399 | public Stream < MergeRequest > getMergeRequestsStream ( MergeRequestFilter filter ) throws GitLabApiException { return ( getMergeRequests ( filter , getDefaultPerPage ( ) ) . stream ( ) ) ; } | Get all merge requests matching the filter as a Stream . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.