fix: fix filePath when anonymized

This commit is contained in:
tdurieux
2024-04-03 18:57:52 +01:00
parent 795a67cdb2
commit 6e8d006220
+6 -2
View File
@@ -270,17 +270,21 @@ export default class AnonymizedFile {
try { try {
if (config.STREAMER_ENTRYPOINT) { if (config.STREAMER_ENTRYPOINT) {
// use the streamer service // use the streamer service
const [sha, token] = await Promise.all([
this.sha(),
this.repository.getToken(),
]);
got got
.stream(join(config.STREAMER_ENTRYPOINT, "api"), { .stream(join(config.STREAMER_ENTRYPOINT, "api"), {
method: "POST", method: "POST",
json: { json: {
token: await this.repository.getToken(), sha,
token,
repoFullName: this.repository.model.source.repositoryName, repoFullName: this.repository.model.source.repositoryName,
commit: this.repository.model.source.commit, commit: this.repository.model.source.commit,
branch: this.repository.model.source.branch, branch: this.repository.model.source.branch,
repoId: this.repository.repoId, repoId: this.repository.repoId,
filePath: this.filePath, filePath: this.filePath,
sha: await this.sha(),
anonymizerOptions: anonymizer.opt, anonymizerOptions: anonymizer.opt,
}, },
}) })