Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
72472908
Commit
72472908
authored
6 years ago
by
Greg Messner
Browse files
Options
Download
Email Patches
Plain Diff
Added transferProject() (#311).
parent
a34185c0
main
5.0.x
5.0.x.jdk17
6.x
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/gitlab4j/api/GroupApi.java
+17
-1
src/main/java/org/gitlab4j/api/GroupApi.java
with
17 additions
and
1 deletion
+17
-1
src/main/java/org/gitlab4j/api/GroupApi.java
+
17
-
1
View file @
72472908
...
...
@@ -1124,7 +1124,7 @@ public class GroupApi extends AbstractApi {
/**
* Deletes a group variable.
*
* <pre><code>DELETE /groups/:id/variables/:key</code></pre>
* <pre><code>
GitLab Endpoint:
DELETE /groups/:id/variables/:key</code></pre>
*
* @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required
* @param key the key of an existing variable, required
...
...
@@ -1133,4 +1133,20 @@ public class GroupApi extends AbstractApi {
public
void
deleteVariable
(
Object
groupIdOrPath
,
String
key
)
throws
GitLabApiException
{
delete
(
Response
.
Status
.
NO_CONTENT
,
null
,
"groups"
,
getGroupIdOrPath
(
groupIdOrPath
),
"variables"
,
key
);
}
/**
* Transfer a project to the Group namespace. Available only for admin users.
*
* <pre><code>GitLab Endpoint: POST /groups/:id/projects/:project_id</code></pre>
*
* @param groupIdOrPath the group ID, path of the group, or a Group instance holding the group ID or path, required
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @return the transfered Project instance
* @throws GitLabApiException if any exception occurs during execution
*/
public
Project
transferProject
(
Object
groupIdOrPath
,
Object
projectIdOrPath
)
throws
GitLabApiException
{
Response
response
=
post
(
Response
.
Status
.
CREATED
,
(
Form
)
null
,
"groups"
,
getGroupIdOrPath
(
groupIdOrPath
),
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
));
return
(
response
.
readEntity
(
Project
.
class
));
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets