Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
a2ea94eb
Unverified
Commit
a2ea94eb
authored
Mar 31, 2020
by
An Phi
Committed by
GitHub
Mar 30, 2020
Browse files
Fix issue with getting project repository archive for GitLab 12.9.1 (#542)
parent
03ef4663
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/RepositoryApi.java
View file @
a2ea94eb
...
...
@@ -441,7 +441,7 @@ public class RepositoryApi extends AbstractApi {
*/
public
InputStream
getRepositoryArchive
(
Object
projectIdOrPath
,
String
sha
)
throws
GitLabApiException
{
Form
formData
=
new
GitLabApiForm
().
withParam
(
"sha"
,
sha
);
Response
response
=
getWithAccepts
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
MediaType
.
MEDIA_TYPE_
WILDCARD
,
Response
response
=
getWithAccepts
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
MediaType
.
WILDCARD
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"repository"
,
"archive"
);
return
(
response
.
readEntity
(
InputStream
.
class
));
}
...
...
@@ -487,7 +487,7 @@ public class RepositoryApi extends AbstractApi {
* https://gitlab.com/gitlab-com/support-forum/issues/3067
*/
Form
formData
=
new
GitLabApiForm
().
withParam
(
"sha"
,
sha
);
Response
response
=
getWithAccepts
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
MediaType
.
MEDIA_TYPE_
WILDCARD
,
Response
response
=
getWithAccepts
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
MediaType
.
WILDCARD
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"repository"
,
"archive"
+
"."
+
format
.
toString
());
return
(
response
.
readEntity
(
InputStream
.
class
));
}
...
...
@@ -507,7 +507,7 @@ public class RepositoryApi extends AbstractApi {
public
File
getRepositoryArchive
(
Object
projectIdOrPath
,
String
sha
,
File
directory
)
throws
GitLabApiException
{
Form
formData
=
new
GitLabApiForm
().
withParam
(
"sha"
,
sha
);
Response
response
=
getWithAccepts
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
MediaType
.
MEDIA_TYPE_
WILDCARD
,
Response
response
=
getWithAccepts
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
MediaType
.
WILDCARD
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"repository"
,
"archive"
);
try
{
...
...
@@ -572,7 +572,7 @@ public class RepositoryApi extends AbstractApi {
* https://gitlab.com/gitlab-com/support-forum/issues/3067
*/
Form
formData
=
new
GitLabApiForm
().
withParam
(
"sha"
,
sha
);
Response
response
=
getWithAccepts
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
MediaType
.
MEDIA_TYPE_
WILDCARD
,
Response
response
=
getWithAccepts
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
MediaType
.
WILDCARD
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"repository"
,
"archive"
+
"."
+
format
.
toString
());
try
{
...
...
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