Skip to content

Commit ad61541

Browse files
author
Florian Aymard
committed
fix: (gitlab api) get file contents and commit changes
1 parent d915405 commit ad61541

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backstage-plugins/plugins/aws-apps-backend/src/api/aws-platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ export class AwsAppsPlatformApi {
437437

438438
if (this.gitProvider===GitProviders.GITLAB)
439439
{
440-
resultBody = await result.value.json();
440+
resultBody = result.value;
441441
}
442442
else if (this.gitProvider===GitProviders.GITHUB)
443443
{

backstage-plugins/plugins/aws-apps-backend/src/api/gitlab-api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class GitLabAPI implements ISCMBackendAPI {
2424
}
2525
else
2626
{
27-
groupName=""
27+
groupName=gitProjectGroup
2828
repoName = gitRepoName;
2929
}
3030
const url = `https://${gitHost}/api/v4/projects?search=${repoName}`;
@@ -156,7 +156,7 @@ export class GitLabAPI implements ISCMBackendAPI {
156156
isSuccuess: true,
157157
message: `Retrieved file content successfully`,
158158
httpResponse : result.status,
159-
value:resultBody.content
159+
value: Buffer.from(resultBody.content, 'base64').toString()
160160
};
161161
}
162162
}

0 commit comments

Comments
 (0)