This is a fork of gist-sync aimed to support storing gists on a self-hosted gitlab instance, and some other providers
This is a plugin for Insomnia that allows users sync workspaces with gist of GitHub and a self-hosted gitlab.
Install the insomnia-plugin-sync-gist-multiprovider
plugin from Preferences > Plugins.
On your github account with gist
scope/permission.
Or in your Gitlab account with the api
scope.
Paste the corresponding configuration
For a github account
{
"provider": "github",
"token": "PERSONAL_ACCES_TOKEN",
"gistID": ""
}
For a self-managed gitlab account, in a project level
{
"provider": "gitlab",
"token": "PERSONAL_ACCES_TOKEN",
"gistID": "",
"baseURL": "http://your.gitlab.ip",
"projectID": "1",
"visibility": "private"
}
For a self-managed gitlab account, in a user level
{
"provider": "gitlab",
"token": "PERSONAL_ACCES_TOKEN",
"gistID": "",
"baseURL": "http://your.gitlab.ip",
"visibility": "private"
}
Setting | Required | Description |
---|---|---|
provider | true | Provider to store the gists. available values: github , gitlab |
token | true | Personal acces token of your provider. NEVER SHARE IT |
gistID | false | Gist ID where your data is stored. If not present, a new one will be automatically created |
timeout | false | Request timeout in miliseconds. Default 3000 |
baseURL | false | Gitlab only. URL of the gitlab instance you want to use. Default https://gitlab.com |
projectID | false | Gitlab only. If you want to save the snippet in a project level, set it to the project ID. Default null (Defaults to user level) |
visibility | false | Visibility of the snippet. Options private , public , internal . Default private |
Note: Most of the parameters aren't strictly validated.
List of things todo.
Note on how conflict resolving is being made. Currently, when you press the receive button, it will get the remote, compare both remote and local for changes and store the newest modifications into a combination of both, this can lead to confusing edge cases. If you are really interested on preserving integrity working with a team, please support insomnia with a team membership.
Possible edge case: Being unable to delete items because of how conflicts are resolved
Support me
Do you have any bucks in your wallet that you don't really need? Great!
You should consider donating to a charity or something more relevant.
If you really want to support me instead, here is a way to do it.
Naming variables is hard