code-settings-sync icon indicating copy to clipboard operation
code-settings-sync copied to clipboard

Suggestion: Allow upload to repository

Open smbkr opened this issue 8 years ago • 38 comments

Issuehunt badges

By @shanalikhan

Before starting this feature, Settings Sync required code requires refactoring. You can take https://github.com/shanalikhan/code-settings-sync/pull/937 as a baseline for refactoring to start working.

Following are the feature i see for git sync.

1. It should ask either backup needs to be saved on Github Gist or simple Git Repository.
2. Once the User select the Git Repo, it should setup accordingly.
3. Provide user option to either use Github or GitLab and create a repository from there by their profile tokens.
4. By Download means, user can do `git pull` forcefully. 
5. By Upload means, user can do `git push` forcefully.
6. Allow user to setup branches or profiles like `master` and `office` and keep the selected profile / branch in Sync Global Settings and download/ upload to that branch.
7. When user is switched to Gist, it should not upload the Git folder there.
8. Support Github and Gitlab Enterprise versions
9. Complete New UI with integrated with above features to allow users to change via UI

Originally by @smbkr

It would be useful to be able to upload the settings to a repo instead of a gist, the way that JetBrains IDEs sync, so that the changes could be versioned and rolled back as desired.


IssueHunt Summary

Backers (Total: $200.00)

Become a backer now!

Or submit a pull request to get the deposits!

Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

smbkr avatar Oct 11 '17 14:10 smbkr

https://github.com/shanalikhan/code-settings-sync/issues/396#issuecomment-330372658

Thanks, will look into this later on.

shanalikhan avatar Oct 12 '17 07:10 shanalikhan

Also like this idea.

chris-c-thomas avatar Nov 06 '17 18:11 chris-c-thomas

I thought gists were repos.

Edit: I commented on this issue because I think it could be useful to merge when downloading instead of just clobbering the local configuration. Is this feature on the roadmap for this project? Would you consider a pull request?

colonelpopcorn avatar Aug 27 '18 17:08 colonelpopcorn

Is this feature on the roadmap for this project?

Yes, but not in short time. Will work on it later on.

Would you consider a pull request?

Definitely, I will more happy to accept PR. But anyone wants to send PR it would be great to discuss as its currently tightly coupled with GIST logics.

shanalikhan avatar Sep 13 '18 09:09 shanalikhan

Following are the feature i see for git sync.

  1. It should ask either backup needs to be saved on Github Gist or simple Git Repository.
  2. Once the User select the Git Repo, it should setup accordingly.
  3. Provide user option to either use Github or GitLab and create a repository from there by their profile tokens.
  4. By Download means, user can do git pull forcefully.
  5. By Upload means, user can do git push forcefully.
  6. Allow user to setup branches or profiles like master and office and keep the selected profile / branch in Sync Global Settings and download/ upload to that branch.
  7. When user is switched to Gist, it should not upload the Git folder there.
  8. Support Github and Gitlab Enterprise versions

shanalikhan avatar Sep 13 '18 09:09 shanalikhan

@boostio funded this issue with $200. Visit this issue on Issuehunt

IssueHuntBot avatar Sep 14 '18 04:09 IssueHuntBot

@shanalikhan funded this issue with $230. Visit this issue on Issuehunt

IssueHuntBot avatar Sep 18 '18 21:09 IssueHuntBot

This feature is funded, anyone is welcome to work and get the money :smile:

shanalikhan avatar Sep 19 '18 09:09 shanalikhan

@mortezaprk has started working. Visit this issue on Issuehunt

IssueHuntBot avatar Sep 21 '18 14:09 IssueHuntBot

@shanalikhan funded this issue with $130. Visit this issue on Issuehunt

IssueHuntBot avatar Oct 11 '18 15:10 IssueHuntBot

@mortezaPRK any update on this ? i can assist you if need any help

shanalikhan avatar Oct 11 '18 15:10 shanalikhan

Thanks. I already do about 80% of the work. There are some bugs. It should be done by the end of next week :)

Sent from ProtonMail mobile

-------- Original Message -------- On Oct 11, 2018, 19:08, Shan Khan wrote:

@mortezaPRK any update on this ? i can assist you if need any help

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mortezaPRK avatar Oct 11 '18 16:10 mortezaPRK

Thats great, make sure you write the test cases. We need to decouple modules in order to implement repo sync rather then writing complete other logic for it.

It would be great you have send me PR with work in progress so i can see and evaluate it mean while you are doing else once all work is completed it would be difficult to change at end if we found any.

shanalikhan avatar Oct 11 '18 16:10 shanalikhan

Sure, I'll send a PR tomorrow.

Sent from ProtonMail mobile

-------- Original Message -------- On Oct 11, 2018, 20:23, Shan Khan wrote:

Thats great, make sure you write the test cases. We need to decouple modules in order to implement repo sync rather then writing complete other logic for it.

It would be great you have send me PR with work in progress so i can see and evaluate it mean while you are doing else once all work is completed it would be difficult to change at end.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mortezaPRK avatar Oct 11 '18 17:10 mortezaPRK

I already do about 80% of the work

@mortezaPRK its been almost a month. It would be great if you can send work in progress PR so i can evaluate at least.

shanalikhan avatar Oct 16 '18 09:10 shanalikhan

If i don't get the PR in a week. I will have to assign the paid issue to someone else.

shanalikhan avatar Oct 28 '18 12:10 shanalikhan

I might be interested to looking into this

OrangeDrangon avatar Oct 29 '18 14:10 OrangeDrangon

I might be interested to looking into this

@OrangeDrangon you can start work by opening the link from issue hunt and assigning the issue hunt ticket to yourself.

Anyone feel free to start working on it, this issue or any other.

Currently the bounties for 4 issues are above 500$.

See the article here. https://dev.to/shanalikhan/settings-sync-paid-issues---fix--earn---nov-18-1ooj

shanalikhan avatar Nov 04 '18 12:11 shanalikhan

Is someone working on it? I can finish first version tomorrow. I have support for detection of gist vs repo url. For now only github, but gitlab API is not so hard to integrate.

wasikuss avatar Nov 13 '18 09:11 wasikuss

@wasikuss no you can start working on it.

I can finish first version tomorrow. I have support for detection of gist vs repo url

How do you intend to do it, Have a look on steps mentioned in first post - We need to just create git init and stage entire user folder.

shanalikhan avatar Nov 13 '18 09:11 shanalikhan

git init isn't required. Both Github and Gitlab APIs allows to publish commits with files directly.

wasikuss avatar Nov 13 '18 10:11 wasikuss

We would want to git init locally at least though, right? This would allow rolling back the user config to a specific commit, which is one of the main advantages of putting the config in a repo instead of a gist.

smbkr avatar Nov 13 '18 10:11 smbkr

The main goal for repository is to create Git Repo, not tightly coupled with github. Once the repo with git init or creating locally will provide user to connect with any git client.

If you look on the steps, it main focus to create git repository and do pull / push to that repo and then provide some interface options to connect to github.

shanalikhan avatar Nov 13 '18 10:11 shanalikhan

So sync with local repo only wraps credentials and git push/pull for local repository allowing upload/download sittings but reverting will be done manually?

@shanalikhan ok, using any client/server convince me to use local repo. but I see upload/download actions acts only as alias for regular git commands and it's only for convenience ( to not enter manually to local repo )?

wasikuss avatar Nov 13 '18 10:11 wasikuss

but reverting will be done manually?

Yes, branch switching will be done if you have multiple environments in single repository.

only as alias for regular git commands and it's only for convenience

Exactly !

shanalikhan avatar Nov 13 '18 10:11 shanalikhan

Ok, now it's more clear how it should work. I'll do PR in 1 or 2 days and then we can discuss required changes for local git support.

wasikuss avatar Nov 13 '18 12:11 wasikuss

I had some problems with testing (especially with --user-data-dir, yes I saw Microsoft/vscode#49306 ) so one more day is needed. First time usage, committing settings, a pushing it (with opt-out) to remote repository and switching between gits and repo already works. Currently I'm working on downloading settings and resolving egde cases (conflicts, etc).

wasikuss avatar Nov 15 '18 11:11 wasikuss

btw, IntelliJ repository settings plugin lets user resolve conflicts in case of impossible auto merge.

tplk avatar Nov 15 '18 14:11 tplk

I saw similar behavior while using gists (manual change + download).

wasikuss avatar Nov 15 '18 14:11 wasikuss

Issue is available for bounty worth $200.

https://issuehunt.io/repos/47984369/issues/413

shanalikhan avatar Feb 06 '19 11:02 shanalikhan