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

Optimize list remote code #46

Closed
mittalyashu opened this issue May 5, 2019 · 2 comments
Closed

Optimize list remote code #46

mittalyashu opened this issue May 5, 2019 · 2 comments
Assignees
Labels
Git Git related stuff git commit... ⚙ Improvement New feature or request 🏃🏻‍♀️ Priority medium Remember to work on this
Projects
Milestone

Comments

@mittalyashu
Copy link
Member

Description

Optimize the source code for listing remote URL.

    async localRepository(path) {
    			let validateGitRepo = git(path);
    			let validateGit = await validateGitRepo.checkIsRepo();
    			let listRemote;
    			try {
    				listRemote = await git(path).listRemote(["--get-url"]);
    				if (listRemote.slice(-4, -1) === "git") {
    					this.$store.commit({
    						type: "repository/localRepositoryRemote",
    						remote: listRemote
    					});
    				}
    			} catch (error) {
    				console.log(error);
    			}
    			try {
    				if (validateGit) {
    					this.$store.commit({
    						type: "repository/addLocalRepository",
    						name: this.getRepositoryName(path),
    						path: path,
    						remote: listRemote,
    						commits: true,
    						remotes: true
    					});
    				}
    			} catch (error) {
    				console.log(error);
    			}
    		}

Screencasts

@mittalyashu mittalyashu added ⚙ Improvement New feature or request Git Git related stuff git commit... labels May 5, 2019
@mittalyashu mittalyashu self-assigned this May 5, 2019
@mittalyashu mittalyashu added this to the 0.0.3 milestone May 5, 2019
@mittalyashu mittalyashu added this to Medium 🤓 in Priority May 6, 2019
@mittalyashu mittalyashu added this to Planned in Roadmap May 14, 2019
@mittalyashu mittalyashu moved this from Planned to In progress in Roadmap May 26, 2019
@mittalyashu
Copy link
Member Author

This issue has been dropped against this issue #170

Roadmap automation moved this from In progress to Done Jul 8, 2019
@mittalyashu mittalyashu added the 🏃🏻‍♀️ Priority medium Remember to work on this label Jul 24, 2019
@mittalyashu mittalyashu removed this from Medium 🤓 in Priority Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Git Git related stuff git commit... ⚙ Improvement New feature or request 🏃🏻‍♀️ Priority medium Remember to work on this
Projects
Roadmap
  
Done
Development

No branches or pull requests

2 participants
@mittalyashu and others