-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Universal Insomnia/Git Sync for all files (documents/collections) #5945
Universal Insomnia/Git Sync for all files (documents/collections) #5945
Conversation
8d00544
to
393d41e
Compare
@@ -17,6 +17,7 @@ interface GenericWorkspace<Scope extends 'design' | 'collection'> { | |||
description: string; | |||
certificates?: any; // deprecated | |||
scope: Scope; | |||
gitSync: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to use a meaningful string instead of a boolean to indicate gitSync, eg. gitUrl?
or a more meaningful name if gitSync is not just indicating the presence of a gitUrl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the logic to the workspaceMeta.gitRepositoryId which already exists 🙏
5f965a6
to
4fd549f
Compare
const vcs = useVCS({ | ||
workspaceId, | ||
}); | ||
activeWorkspaceMeta?: WorkspaceMeta; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused argument
if (!workspaceMeta) { | ||
throw new Error('Workspace meta not found'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invariant
gitRepository?.uri && | ||
gitRepository?._id && | ||
gitStatusFetcher.state === 'idle' && | ||
!gitStatusFetcher.data && | ||
gitRepoDataFetcher.data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name this as a constant to indicate what its doing, or leave a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few comments about consistency, LGTM did not test 😉
55c5d06
to
fa9fa2c
Compare
…ng#5945) * share design documents and tests with insomnia sync * share collection and documents with insomnia/git sync * checkpoint * redirect when cloning (pulling) a new remote project * backend workspace card * redirect logic * local changes styles * loading indicator * fix sync button styles * use interval to refetch git * open the repo modal first before switching to git sync * use gitRepositoryId from metadata * fix sync option update * cleanup fetcher check * fixes * cleanup pull-push * undo logo change * clean git-vcs * use cloud icon for insomnia sync * cleanup card * more cleanup * better return type for fetchfetcher * update git tests * fix tests * fix some prerelease tests * fix cloning without an api spec * fix some more tests that expect a file to exist * fix lint error
changelog(New Features): Added Universal Insomnia and Git Sync for all files (Documents and Collections). It's now possible to share Design Documents with Insomnia Sync and Collections with Git Sync. It's also possible to chose and switch between method of sync (Insomnia/Git).
Highlights:
Notes:
Next steps:
Closes INS-2657