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

feat(gitFileSystem): safer api #1046

Merged
merged 5 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/routes/formsg/formsgGGsRepair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ ${syncedRepos.map((repo) => `<li>${repo}</li>`)}

doesRepoNeedClone(repoName: string): ResultAsync<true, false> {
return this.gitFileSystemService
.isGitInitialized(repoName)
.isGitInitialized(repoName, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

i'm assuming that this change was made because the method should only be used as part of the repair form?

this is also out of scope but omitting the argument (branchName or isStaging) and exporting this function might lead to people calling this for staging and wondering why it doesn't work.

we can either inline this directly or make it private (cos the false case can always be chained off an orElse) but ok with not doing this now because it's not a functional change and more of a good to have.

.andThen((isRepoInEfs) => {
if (isRepoInEfs) {
return errAsync<true, false>(false)
Expand Down
Loading
Loading