Skip to content

Commit

Permalink
DOP-5071 playing with projections
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Oct 15, 2024
1 parent 5dfade5 commit 1190c16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion populate-metadata/src/getProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export const getDocsetEntry = async ({
docsets: Collection<DocsetsDocument>;
project: string;
}): Promise<WithId<DocsetsDocument>> => {
const env = 'dotcomstg';
const docsetsQuery = { project: { $eq: project } };
const projection = { projection: { repos: 0 } };
const projection = { projection: { bucket: { env: 1 } } };
const docset = await docsets.findOne<DocsetsDocument>(
docsetsQuery,
projection,
Expand Down
10 changes: 5 additions & 5 deletions populate-metadata/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extension.addBuildEventHandler(
branchName: branchName,
repoName: repoName,
});
console.log(docsetEntry);

//check if build was triggered by a webhook (If so, it was a prod deploy);
const isProdDeploy = !!(
Expand All @@ -34,11 +35,10 @@ extension.addBuildEventHandler(
);
netlifyConfig.build.environment.PRODUCTION = isProdDeploy;
netlifyConfig.build.environment.REPO = repo;
process.env.REPO_NAME = 'gibberish';
console.log(
netlifyConfig.build.environment.PRODUCTION,
netlifyConfig.build.environment.REPO,
);
// console.log(
// netlifyConfig.build.environment.PRODUCTION,
// netlifyConfig.build.environment.REPO,
// );

// const updatedDocsetEntry = getEnvDependentProperties(
// docsetEntry,
Expand Down

0 comments on commit 1190c16

Please sign in to comment.