Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Narrowing search of GB Files to specific experience folder, when drafts is set to false #38

Closed
wants to merge 1 commit into from

Conversation

arshadparwaiz
Copy link
Collaborator

No description provided.

@@ -187,7 +187,7 @@ async function findAllFiles(experienceName, appConfig, sharepoint) {
return findAllGrayboxFiles({
baseURI: sp.api.file.get.gbBaseURI,
options,
gbFolders: appConfig.isDraftOnly() ? [`/${experienceName}/drafts`] : [''],
gbFolders: appConfig.isDraftOnly() ? [`/${experienceName}/drafts`] : [`/${experienceName}`],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I remember, it traverses at the top level because it needs to pick the files from the /locale/exp folders as well.

It further filters the path when traversing using a regex
const pathsToSelectRegExp = new RegExp(^/([^/]+/)?${experienceName}(/.*)?$);

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks @sukamat !!
Will close the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants