Skip to content

Commit

Permalink
[Website] GitHub export modal: Correctly compute the root path when e…
Browse files Browse the repository at this point in the history
…xporting the entire site (#2103)
  • Loading branch information
adamziel authored Dec 19, 2024
1 parent f1b441f commit d84c326
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/playground/data-liberation/blueprints-library
Submodule blueprints-library updated 0 files
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export default function GitHubExportForm({
} else if (formValues.contentType === 'plugin') {
updatedValues['toPathInRepo'] = `/${formValues.plugin}`;
} else {
updatedValues['toPathInRepo'] = '/playground';
updatedValues['toPathInRepo'] = '/';
}
setFormValues({
...formValues,
Expand Down Expand Up @@ -312,6 +312,10 @@ export default function GitHubExportForm({
);
}

if (relativeExportPaths.length === 0) {
relativeExportPaths = ['/'];
}

const isoDateSlug = new Date().toISOString().replace(/[:.]/g, '-');
const newBranchName = `playground-changes-${isoDateSlug}`;
let commitMessage = formValues.commitMessage;
Expand Down Expand Up @@ -382,7 +386,6 @@ export default function GitHubExportForm({
});
}
}

const changes = await changeset(
new Map(Object.entries(ghComparableFiles)),
allPlaygroundFiles
Expand Down

0 comments on commit d84c326

Please sign in to comment.