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

WIP: Support for git repository #707

Closed
wants to merge 10 commits into from
Closed

Conversation

wasikuss
Copy link

@wasikuss wasikuss commented Nov 16, 2018

Short description of what this resolves:

This PR introduce support for git repository for settings. It allows to push settings to remote repo with opt-out (uncheck option in settings)

Changes proposed in this pull request:

Slightly changed flow of gist. Generated files are saved to disk and then committed to gist/repo. After this gist flow can be simplified - no template is required (GIST_JSON_EMPTY).

Fixes: #413

How Has This Been Tested?

Tested locally and on clean OS. No git installed, no git configs, etc.

Checklist:

  • I have read the contribution guidelines.
  • My change requires a change to the documentation and Github Wiki.
  • I have updated the documentation and Wiki accordingly.

TODO:

  • It should ask either backup needs to be saved on Github Gist or simple Git Repository.
  • Once the User select the Git Repo, it should setup accordingly.
  • Provide user option to either use Github or GitLab and create a repository from there by their profile tokens.
  • By Download means, user can do git pull forcefully.
  • By Upload means, user can do git push forcefully.
  • 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.
  • When user is switched to Gist, it should not upload the Git folder there.
  • Support Github and Gitlab Enterprise versions

package.nls.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@wasikuss wasikuss changed the base branch from master to v3.2.1 November 19, 2018 12:49
@shanalikhan shanalikhan changed the base branch from v3.2.1 to master November 26, 2018 09:55
@shanalikhan
Copy link
Owner

@wasikuss when are you planning to complete this PR. :)

@wasikuss
Copy link
Author

Probably tomorrow. I've download implemented but it doesn't trigger update ( no new extensions installed, etc. ). I'm searching why it happens.

@shanalikhan
Copy link
Owner

sure, i have updated the todo for this pr also. So we both are on same page for this Feature.

@wasikuss
Copy link
Author

wasikuss commented Dec 4, 2018

I have some questions:

  1. Force Upload
    It should be enabled by default or use settings similar to sync.repoPush, for ex. sync.repoForcePush/Upload?

  2. Force Download
    Local repo has history based on commits so force download could mean many things:

    • if remote branch ref isn't fast-forward it should:
      • move branch ref and leave local history, git garbage collector will remove commits in future (reset --hard)
      • make merge commit (pull with merge)
  3. Profiles
    Based on branches, so additional commands are nice to have (profile switching/creation)?

  4. Github/GitLab Enterprise versions
    I've never worked with enterprise versions of GitLab or GitHub. Is there any additional information about what to do? How should it work?

@shanalikhan
Copy link
Owner

  1. It should be enabled by default, ( no option should be there to disable ) and should push by force by committing if some file is changed and added in directory. If there is no change from origin, it should inform user that its already up to date.
  2. yes , it should reset the settings and pull it.
  3. Yes, for now - we can include two menu item in advance option. Environment Switch / Create
    a. Create > Ask user name of environment > Create new branch with it and push all the changes.
    b. Switch > Provide list of branches and let user select > Check out that branch by reset the current changes.
  4. Github / Gitlab
    a. Need to create new repository in Github using the node library that is already used by Settings sync for gist ( use other api or gitlab), and clone locally , when its setup all the push / pull will be done seperately.

@shanalikhan
Copy link
Owner

Can we set any deadline (whatever that is feasible for you) for this paid PR ?

@wasikuss
Copy link
Author

wasikuss commented Dec 7, 2018

I will push changes until tomorrow, sorry for taking so long. I'm only need to finish github/gitlab integration, so if there will be no additional comments to PR then tomorrow it will be done.

@wasikuss
Copy link
Author

There are some bugs in this PR and I'll try fix them as soon as possible. Main objectives has been achieved but I've found additional special cases.

@shanalikhan
Copy link
Owner

shanalikhan commented Dec 10, 2018

Okay thats great.
Yes, there will many additional cases we need to handle.
you can create the todo list above and i can add them if i got any ( limited to the requirement specified above )

You might need to add wiki in Wiki section.

Make sure to ask user to select from Gist or Git repository on installing and setting up first time.

Once it is completed from your side - I will start a review, after publishing i will assign you all the upcoming issues [ limited to the requirement locked down above] :)

@wasikuss
Copy link
Author

I had a break of coding last week and now I'm back. Only some UI changes left so I will push changes in couple of days. After that, we all can test if all works as should.

@shanalikhan
Copy link
Owner

any update on this?

@shanalikhan
Copy link
Owner

I'll be closing this PR in this month end ( after 9 days ).

If you will be able to complete it by then, it will be merged, else I will be assigning bounty and feature to someone else.

@shanalikhan shanalikhan closed this Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants